Related Questions
What is the correct answer?
4
A Java monitor must either extend thread class or implement Runnable interface.
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
A variable declared inside the for loop control can not be referenced out side the loop.
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
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
An individual array element that is passed to a method and modified in that method will contain the modified value when the called method completes execution.
What is the correct answer?
4
Which javadoc tag is used to denote a comment for methods parameters?
What is the correct answer?
4
Which of the following are not keywords?
What is the correct answer?
4
Objects are passed to a method by use of call-by-reference.
What is the correct answer?
4
Declaring a method synchronized guarantees that the deadlock cannot occur.
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
In order to connect to a database through java program we must create _______-
A. Connection, Statement, ResultSet
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
Which of the following methods can be used to change the size of a
size() *
resize()
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
When we implement the Runnable interface, we must define the method
What is the correct answer?
4
The setBackground() method is part of the class
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
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
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
In RMI we invoke client method from remote server
What is the correct answer?
4
Which exception is thrown by the read() method of InputStream 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
JdbcOdbcDriver is an object of Object class
What is the correct answer?
4
Which of the following are keywords?
What is the correct answer?
4
Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
What is the correct answer?
4
Which of the following statements are true?
A. UTF characters are all 24 bits.
B. Reader class has methods that can read integers and floats.
C. Unicode characters are all 16 bits.
What is the correct answer?
4
Which of the following string can be used as mode string for creating a RandomAccessFile object?