Related Questions
What is the correct answer?
4
forName() is a static factory method
What is the correct answer?
4
Any method in a supper class can be over ridden in its subclass.
What is the correct answer?
4
executeUpdate automatically updates data because___________
A. auto commit is on, by default
B. It performs a hidden commit statement as well
What is the correct answer?
4
Throwing an exception always causes program termination.
What is the correct answer?
4
Consider the following code snippet:
try
{
int x=0; int y=50/x;
System.out.println("Division by zero");
}
catch(ArithmeticException e)
{
System.out.println("catch block");
}
What will be the output?
D. Division by zero catch block
What is the correct answer?
4
A final class may not have any abstract method.
What is the correct answer?
4
A catch can have comma-separated multiple arguments.
What is the correct answer?
4
EJBs can be of the following type(s)
None of the above
What is the correct answer?
4
A panel can not be added to another panel.
What is the correct answer?
4
When present, package must be the first no comment statement in the file.
What is the correct answer?
4
Which of the following statements are valid array declarations?
What is the correct answer?
4
We can over load methods with differences only in their return type.
What is the correct answer?
4
If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
What is the correct answer?
4
It is perfectly legal to assign a subclass object to a supper class reference.
What is the correct answer?
4
Which of the following represent legal flow control statements?
What is the correct answer?
4
Consider the following class definition.
Class Student extends String
{
}
What happens when we try to compile this class?
A. Will not compile because class body is not defined
B. Will not compile because class is not declared public
C. Will compile successfully.
D. Will not compile because String is abstract
What is the correct answer?
4
Objects are passed to a method by use of call-by-reference.
What is the correct answer?
4
Which key word can protect a class in package from accessibility by the classes outside the package?
D. don't use any keyword at all(make it default)
What is the correct answer?
4
Two methods cannot have the same name in Java.
What is the correct answer?
4
A Java monitor must either extend thread class or implement Runnable interface.
What is the correct answer?
4
Which of the following control expressions are valid for an if statement?
What is the correct answer?
4
It is perfectly legal to refer to any instance variable inside of a static method.
What is the correct answer?
4
The setBackground() method is part of the class
What is the correct answer?
4
Session bean
A. Represents a single client inside the application server
D. Satisfies all of the above conditions
What is the correct answer?
4
Any class may be inherited by another class in the same package.
What is the correct answer?
4
With javadoc, which of the following denotes a javadoc comment?
What is the correct answer?
4
Which of the following command lines options generates documentation for all classes and methods?
What is the correct answer?
4
An individual array element that is passed to a method and modified in that method will contain the modified value when the called method completes execution.
What is the correct answer?
4
What is wrong in the following class definitions?
abstract class print {
abstract show();
}
class Display extends print {
}
B. Wrong Method show() should have a return type
C. Wrong Methods show() is not implemented in Display
D. Wrong Display does not contain any members.
What is the correct answer?
4
Which of the following methods can be used to draw the outline of a square?