Related Questions
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
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
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
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 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
A class may be both abstract and final.
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
A catch can have comma-separated multiple arguments.
What is the correct answer?
4
Consider the following statements:
int x = 10, y = 15;
x = ((x < y) ? (y + x) : (y - x);
What will be the value of x after executing these statements?
D. Error can't be executed.
What is the correct answer?
4
Which of the following classes are available in the java.lang package?
What is the correct answer?
4
A Java monitor must either extend thread class or implement Runnable interface.
What is the correct answer?
4
In a single Servlet class we can use____________
A. doGet(...) method only
B. doPost(...) method only
C. doGet(...) method and doPost(...) method both at a time.
What is the correct answer?
4
A JSP file can be stored_________________
A. With the extension .jsp in servlets folder of the jws
B. With the extension .html in public_html folder of the jws
C. With the extension .jsp in public_html folder of the jws
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
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
Every method of a final in class is implicitly final.
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 RMI before running the client program we must start RMI Registry.
What is the correct answer?
4
DataInput is
A. An abstract class defined is java.io.
B. A class we can use to read primitive data types.
C. An interface that defines methods to open files.
D. An interface that defines methods to read primitive data types.
What is the correct answer?
4
Every call to wait has a corresponding call to notify that will eventually end the wafting.
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
The default case is always required in the switch selection structure.
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 expression (x == y && a<b) is true If either x == y is true or a<b is true.
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
When the string objects are compared with ==, the result is true If the strings contain the same values.
What is the correct answer?
4
The length of a string object 's1' can be obtained using the expression s1.length.
What is the correct answer?
4
Submit button always fires doPost(...)
What is the correct answer?
4
Which of the following will produce a value of 22 if x=22.9: