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
When present, package must be the first no comment statement in the file.
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
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 default case is always required in the switch selection structure.
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
Submit button always fires doPost(...)
What is the correct answer?
4
Frames and applets cannot be used together in the same program.
What is the correct answer?
4
Two methods cannot have the same name in Java.
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 methods wait() and noify() are defined in
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
Given the code
String s = new String("abc");
Which of the following calls are valid?
What is the correct answer?
4
A panel can not be added to another panel.
What is the correct answer?
4
In the code below, what data types the variable x can have?
What is the correct answer?
4
All methods in an abstract class must be declared abstract.
What is the correct answer?
4
Which of the following methods belong to the String class?
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
A Java monitor must either extend thread class or implement Runnable interface.
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
It is an error to have a method with the same signature in both the super class and its subclass.
What is the correct answer?
4
To delete a file, we can use an instance of class file.
What is the correct answer?
4
When we invoke repaint () for a Component, the AWT invokes the method:
What is the correct answer?
4
Declarations can appear anywhere in the body of a Java method.
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
Which of the following represent legal flow control statements?
What is the correct answer?
4
The programmer must explicitly create the system .in and system .out objects.
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
For all insert, update, delete, query operations on a database, ResultSet object creation is mandatory.
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");