Related Questions
What is the correct answer?
4
A static class method can be invoked by simply using the name of the method alone.
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 control expressions are valid for an if statement?
What is the correct answer?
4
A class may be both abstract and final.
What is the correct answer?
4
JdbcOdbcDriver is an object of Object class
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
The name of a Java program file must match the name of the class with the extension Java.
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
DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
What is the correct answer?
4
Which of the following string can be used as mode string for creating a RandomAccessFile object?
What is the correct answer?
4
Submit button always fires doPost(...)
What is the correct answer?
4
A catch can have comma-separated multiple arguments.
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
Every method of a final in class is implicitly final.
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
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
The methods wait() and noify() are defined in
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
The check box group class is a subclass of the component class.
What is the correct answer?
4
When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
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
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
When we invoke repaint () for a Component, the AWT invokes the method:
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
A Java monitor must either extend thread class or implement Runnable interface.
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
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 exception is thrown by the read() method of InputStream class?
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
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