You are not logged in.
Pages:: 1
#1 2015-06-13 04:50:46
Code Fragments:
Java Quizzes Java Language Interfaces And Abstract Classes
Directions:
interface Base{
boolean m1 ();
byte m2(short s);
}
Question:
Which two code fragments will compile?
1. interface Base2 implements Base {}
2. abstract class Class2 extends Base
{ public boolean m1(){ return true; }}
3. abstract class Class2 implements Base {}
4. abstract class Class2 implements Base
{ public boolean m1(){ return (7 > 4); }}
5. abstract class Class2 implements Base
{ protected boolean m1(){ return (5 > 7) }}
Option A):
1 and 2
Option B):
2 and 3
Option C):
3 and 4
Option D):
1 and 3
Correct Answer is Option C):
3 and 4
You cannot discover the new oceans unless you have the courage to lose the sight of the shore.
Offline
2015-06-13 04:50:46
- Advertisement
- Ads By Google
Re: Code Fragments:
\n
Pages:: 1