Related Questions
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
To delete a file, we can use an instance of class file.
What is the correct answer?
4
forName() is a static factory method
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
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 check box group class is a subclass of the component class.
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 10 if x = 9.7?
What is the correct answer?
4
A method declared as static can not access non-static class members.
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
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
Which of the following represent legal flow control statements?
What is the correct answer?
4
A catch can have comma-separated multiple arguments.
What is the correct answer?
4
Which of the following are not keywords?
What is the correct answer?
4
Which of the following will produce a value of 22 if x=22.9:
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
Which of the following command lines options generates documentation for all classes and methods?
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
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
Which of the following statements are valid array declarations?
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
When we implement an interface method, it should be declared as public.
What is the correct answer?
4
Which exception is thrown by the read() method of InputStream class?
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
A class may be both abstract and final.
What is the correct answer?
4
Which of the following are the wrapper classes?
What is the correct answer?
4
An EJB is a server-side component that encapsulates the business logic of an application
What is the correct answer?
4
Every method of a final in class is implicitly final.
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
Declaring a method synchronized guarantees that the deadlock cannot occur.