Related Questions
What is the correct answer?
4
A thread can make second thread ineligible for execution by calling the suspend (-) method on second thread.
What is the correct answer?
4
The programmer must explicitly create the system .in and system .out objects.
What is the correct answer?
4
The setBackground() method is part of the class
What is the correct answer?
4
It is an error if a class with one or more abstract methods is not explicitly declared abstract.
What is the correct answer?
4
It is an error to have a method with the same signature in both the super class and its subclass.
What is the correct answer?
4
The import statement is always the first no comment statement in a Java program files.
What is the correct answer?
4
Which of the following control expressions are valid for an if statement?
What is the correct answer?
4
The length of a string object 's1' can be obtained using the expression s1.length.
What is the correct answer?
4
The default case is always required in the switch selection structure.
What is the correct answer?
4
Give file is a file object, which of the following are legal statements to create a new file.
B. FileOutputStream fos=new FileOutputStream(file);
C. FileInputStream fis=new FileInputStream(file);
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
When we implement an interface method, it should be declared as public.
What is the correct answer?
4
All methods in an abstract class must be declared abstract.
What is the correct answer?
4
Which of the following methods can be used to remove a component from the display?
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
What is java -g used for?
B. Executing a class with optimization turned off
C. To provided information about deprecated methods
What is the correct answer?
4
The break statement is required in the default case of a switch selection structure.
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
Declaring a method synchronized guarantees that the deadlock cannot occur.
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
Consider the following statements:
int x = 10, y = 15;
x = ((x < y) ? (y + x) : (y - x);
What will be the value of x after executing these statements?
D. Error can't be executed.
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 methods can be used to change the size of a
size() *
resize()
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
Any method in a supper class can be over ridden in its subclass.
What is the correct answer?
4
Which of the following are keywords?
What is the correct answer?
4
Which of the following represent legal flow control statements?
What is the correct answer?
4
forName() is a static factory method
What is the correct answer?
4
When we invoke repaint () for a Component, the AWT invokes the method:
What is the correct answer?
4
Which of the following classes are available in the java.lang package?