Related Questions
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
Servlet can have ___________
A. get method and post method
B. get method or post method
What is the correct answer?
4
A package is a collection of
D. classes and interfaces
What is the correct answer?
4
Objects are passed to a method by use of call-by-reference.
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
The name of the RMI compiler is ___________
What is the correct answer?
4
Which of the following statements are valid array declarations?
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
When the string objects are compared with ==, the result is true If the strings contain the same values.
What is the correct answer?
4
In RMI we invoke client method from remote server
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
We can add more than one class(es) at the time of compilation Java Beans.
What is the correct answer?
4
Declaring a method synchronized guarantees that the deadlock cannot occur.
What is the correct answer?
4
A constructor must always invoke its supper class constructor in its first statement.
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
We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the following keywords would achieve this?
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
Given the code
String s = new String("abc");
Which of the following calls are valid?
What is the correct answer?
4
To delete a file, we can use an instance of class file.
What is the correct answer?
4
With javadoc, which of the following denotes a javadoc comment?
What is the correct answer?
4
In RMI before running the client program we must start RMI Registry.
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
One the features of is that an array can store many different types of values.
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
The modulus operator (%) can be used only with Integer operands.
What is the correct answer?
4
Which of the following will produce a value of 22 if x=22.9:
What is the correct answer?
4
Two methods cannot have the same name in Java.
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
What is the correct answer?
4
Declarations can appear anywhere in the body of a Java method.
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);