Related Questions
What is the correct answer?
4
All methods in an abstract class must be declared abstract.
What is the correct answer?
4
One the features of is that an array can store many different types of values.
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
Which of the following will produce a value of 10 if x = 9.7?
What is the correct answer?
4
Java is fully object oriented programme.
What is the correct answer?
4
A class may be both abstract and final.
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
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
Which of the following methods belong to the String class?
What is the correct answer?
4
Which are the valid ways to create DataInputStream streams?
A. new DataInputStream(new File("in.dat"));
B. new DataInputStream(new FileInputStream("in.dat"));
C. new DataInputStream("in.dat");
D. new DataInputStream("in.data","r");
What is the correct answer?
4
executeUpdate(------------) returns ___________
B. Returns a ResultSet object
C. Returns an integer value to show the no. of updated rows
What is the correct answer?
4
Submit button always fires doPost(...)
What is the correct answer?
4
The default case is always required in the switch selection structure.
What is the correct answer?
4
Which of the following classes are available in the java.lang package?
What is the correct answer?
4
In order to connect to a database through java program we must create _______-
A. Connection, Statement, ResultSet
What is the correct answer?
4
The modulus operator (%) can be used only with Integer operands.
What is the correct answer?
4
A package is a collection of
D. classes and interfaces
What is the correct answer?
4
Which of the following methods can be used to draw the outline of a square?
What is the correct answer?
4
In evaluating a logical expression of type 'Boolean expression 1&& Boolean expression 2', both the Boolean expressions are not always evaluated.
What is the correct answer?
4
A variable declared inside the for loop control can not be referenced out side the loop.
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
Which of the following control expressions are valid for an if statement?
What is the correct answer?
4
Which javadoc tag is used to denote a comment for methods parameters?
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
The use of protected keyword to a member in a class will restrict its visibility as follows:
A. Visibility only in the class and its subclasses in the same package.
B. Visibility only inside the same package.
C. Visibility in all classes in the same package and subclasses in other packages.
D. Visibility only in the class where it is declared.
What is the correct answer?
4
Java always provides a default constructor to a class.
What is the correct answer?
4
Connection, Statement are interfaces and ResultSet is a class.
What is the correct answer?
4
In the code below, what data types the variable x can have?
What is the correct answer?
4
Which of the following represent legal flow control statements?
What is the correct answer?
4
What is error in the following class definitions?
abstract class xy {
abstract sum(int x, int y) {
}
}
A. class header is not define properly
B. constructor is no defined
C. method is not defined properly