Related Questions
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
Which of the following methods belong to the String class?
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
The modulus operator (%) can be used only with Integer operands.
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
Frames and applets cannot be used together in the same program.
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
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
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
It is an error if a class with one or more abstract methods is not explicitly declared abstract.
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
Any class may be inherited by another class in the same package.
What is the correct answer?
4
Which of the following represent legal flow control statements?
What is the correct answer?
4
The keywords reserved but not used in the initial version of Java re:
What is the correct answer?
4
class.forName(...) creates an instance of java ODBC driver
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
Which of the following statements are valid array declarations?
What is the correct answer?
4
A package is a collection of
D. classes and interfaces
What is the correct answer?
4
executeUpdate automatically updates data because___________
A. auto commit is on, by default
B. It performs a hidden commit statement as well
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
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
Connection, Statement are interfaces and ResultSet is a class.
What is the correct answer?
4
Every method of a final in class is implicitly final.
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
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
A string object can not be modified after it is created.
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
Which of the following string can be used as mode string for creating a RandomAccessFile object?
What is the correct answer?
4
DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
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.