Self-study questions for Sun Certified Java Programmer (SCJP) (310-055). God speed!
Public abstract class Canine { public Bark speak(); }
Public abstract class Canine { public Bark speak() { } }
Public class Canine { public abstract Bark speak(); }
Public class Canine abstract { public abstract Bark speak(); }
Rate this question:
"X extends Y" is correct if and only if X is a class and Y is an interface.
"X extends Y" is correct if and only if X is an interface and Y is a class.
"X extends Y" is correct if X and Y are either both classes or both interfaces.
"X extends Y" is correct for all combinations of X and Y being classes and/or interfaces.
Rate this question:
Int $x;
Int 123;
Int _123;
Int #dim;
Int central_sales_region_Summer_2005_gross_sales;
Rate this question:
AddSize
GetCust
DeleteRep
IsColorado
PutDimensions
Rate this question:
Static void doStuff(int... doArgs) { }
Static void doStuff (int [] doArgs) { }
Static void doStuff(int doArgs...) { }
Static void doStuff(int... doArgs, int y) { }
Static void doStuff(int x, int... doArgs) { }
Rate this question:
Has-a relationships always rely on inheritance.
Has-a relationships always rely on instance variables.
Has-a relationships always require at least two class types
Has-a relationships always rely on polymorphism.
Has-a relationships are always tightly coupled.
Rate this question:
Flip a Clidlet
Flip a Clidde
Flip a Clidder Flip a Clidlet
# Flip a Clidlet Flip a Clidder
Compilation fails.
Rate this question:
Public abstract class Frob implements Frobnicate { public abstract void twiddle(String s){} }
Public abstract class Frob implements Frobnicate { }
Public class Frob extends Frobnicate { public void twiddle(Integer i) { } }
Public class Frob implements Frobnicate { public void twiddle(Integer i) { } }
Public class Frob implements Frobnicate { public void twiddle(String i) { } public void twiddle(Integer s) { } }
Rate this question:
BD
DB
BDC
DBC
Compilation fails.
Rate this question:
The attributes of the class are all private.
The class refers to a small number of other objects.
The object contains only a small number of variables.
The reference variable is declared for an interface type, not a class. The interface provides a small number of methods.
It is unlikely that changes made to one class will require any changes in another.
Rate this question:
Clidlet
Clidder
Clidder Clidlet
Clidlet Clidder
Compilation fails.
Rate this question:
Quiz Review Timeline (Updated): May 8, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.