Related Questions
What is the correct answer?
4
When we implement the Runnable interface, we must define the method
What is the correct answer?
4
The programmer must explicitly create the system .in and system .out objects.
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
Declaring a method synchronized guarantees that the deadlock cannot occur.
What is the correct answer?
4
A package is a collection of
D. classes and interfaces
What is the correct answer?
4
Java always provides a default constructor to a class.
What is the correct answer?
4
The expression (x == y && a<b) is true If either x == y is true or a<b is true.
What is the correct answer?
4
forName() is a static factory method
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
Which of the following are not keywords?
What is the correct answer?
4
Members of a class specified as private are accessible only to the methods of the class.
What is the correct answer?
4
Which of the following are keywords?
What is the correct answer?
4
putValue(...) method takes _____________________-
A. Two arguments of object type
B. First one is of a character type and second one is of an object type
C. First one is of an object type and second one is of a character type
What is the correct answer?
4
A JSP file can be stored_________________
A. With the extension .jsp in servlets folder of the jws
B. With the extension .html in public_html folder of the jws
C. With the extension .jsp in public_html folder of the jws
What is the correct answer?
4
The modulus operator (%) can be used only with Integer operands.
What is the correct answer?
4
class.forName(...) creates an instance of java ODBC driver
What is the correct answer?
4
If you want to assign a value of 99 to the variable year, then which of the following lines can be used within an <applet> tags?
A. number=getParameter(99)
D. <param = radius value ==99>
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
A method declared as static can not access non-static class members.
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
When we invoke repaint () for a Component, the AWT invokes the method:
What is the correct answer?
4
The name of a Java program file must match the name of the class with the extension Java.
What is the correct answer?
4
Which of the following represent legal flow control statements?
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
Which of the following keywords are used to control access to a class member?
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
A string object can not be modified after it is created.
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
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
JSP files creates ________________
B. html files and java files
C. java files and class files