Related Questions
What is the correct answer?
4
The use of protected keyword to a member in a class will restrict its visibility as follows:
A. Visibility only in the class and its subclasses in the same package.
B. Visibility only inside the same package.
C. Visibility in all classes in the same package and subclasses in other packages.
D. Visibility only in the class where it is declared.
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
A final class may not have any abstract method.
What is the correct answer?
4
Which of the following methods can be used to draw the outline of a square?
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
DriverManager.getConnection("jdbc:odbc:dsn_name") method does not depend on the class.forName(...) method.
What is the correct answer?
4
The name of the RMI compiler is ___________
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
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
The name of a Java program file must match the name of the class with the extension Java.
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
Every method of a final in class is implicitly final.
What is the correct answer?
4
In RMI before running the client program we must start RMI Registry.
What is the correct answer?
4
Which of the following represent legal flow control statements?
What is the correct answer?
4
Session bean
A. Represents a single client inside the application server
D. Satisfies all of the above conditions
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
Which of the following keywords are used to control access to a class member?
What is the correct answer?
4
Which exception is thrown by the read() method of InputStream class?
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 of the following command lines options generates documentation for all classes and methods?
What is the correct answer?
4
Which key word can protect a class in package from accessibility by the classes outside the package?
D. don't use any keyword at all(make it default)
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
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
To delete a file, we can use an instance of class file.
What is the correct answer?
4
When X is a positive number the operations x>> 2 and x>>>2 both produce the same result.
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
Given the code
String s = new String("abc");
Which of the following calls are valid?
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
A class may be both abstract and final.