Related Questions
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
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
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
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
It is an error if a class with one or more abstract methods is not explicitly declared abstract.
What is the correct answer?
4
Servlet has ___________
C. All of the above methods.
What is the correct answer?
4
With javadoc, which of the following denotes a javadoc comment?
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 a Java program file must match the name of the class with the extension Java.
What is the correct answer?
4
executeUpdate(------------) returns ___________
B. Returns a ResultSet object
C. Returns an integer value to show the no. of updated rows
What is the correct answer?
4
JdbcOdbcDriver is an object of Object class
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
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
The concept of multiple inheritance is implemented in Java by
A. extending two or more classes
B. extending one class and implementing one or more interfaces
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
To delete a file, we can use an instance of class file.
What is the correct answer?
4
A panel can not be added to another panel.
What is the correct answer?
4
We can over load methods with differences only in their return type.
What is the correct answer?
4
Which of the following classes are available in the java.lang package?
What is the correct answer?
4
Which of the following are the wrapper classes?
What is the correct answer?
4
JSP files creates ________________
B. html files and java files
C. java files and class files
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
Declarations can appear anywhere in the body of a Java method.
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
What does the following line of code do?
TextField text=new TextField(10);
A. Creates text object that can hold 10 rows of text.
B. Creates text object that can hold 10 columns of text.
C. Creates the object text and initializes it with the value 10.
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
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");
What is the correct answer?
4
All the bitwise operators have the same level of precedence in Java.
What is the correct answer?
4
The setBackground() method is part of the class
What is the correct answer?
4
Which of the following methods can be used to draw the outline of a square?