Related Questions
What is the correct answer?
4
forName() is a static factory method
What is the correct answer?
4
Which exception is thrown by the read() method of InputStream class?
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
If m and n are int type variables, what will be the result of the expression
'm % n' when m = -14 and n = -3?
What is the correct answer?
4
Every method of a final in class is implicitly final.
What is the correct answer?
4
A thread can make second thread ineligible for execution by calling the suspend (-) method on second thread.
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 are not keywords?
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
Declarations can appear anywhere in the body of a Java method.
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
Consider the following class definitions:
class maths {
student student1;
}
class student {
String name;
}
This code represents:
A. an 'is a' relationship
B. a 'has a' relationship
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
In RMI we invoke client method from remote server
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
Which of the following command lines options generates documentation for all classes and methods?
What is the correct answer?
4
In the code below, what data types the variable x can have?
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
A class may be both abstract and final.
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
The import statement is always the first no comment statement in a Java program files.
What is the correct answer?
4
EJBs can be of the following type(s)
None of the above
What is the correct answer?
4
When we implement an interface method, it should be declared as public.
What is the correct answer?
4
Connection, Statement are interfaces and ResultSet is a 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
Throwing an exception always causes program termination.
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
In order to connect to a database through java program we must create _______-
A. Connection, Statement, ResultSet
What is the correct answer?
4
The programmer must explicitly create the system .in and system .out objects.
What is the correct answer?
4
Which of the following statements are true?
A. An abstract class may not have any final methods?
B. A final class may not have any abstracts methods.
C. Transient variables must be static.