Related Questions
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
Any class may be inherited by another class in the same package.
What is the correct answer?
4
Which of the following statements are true?
A. UTF characters are all 24 bits.
B. Reader class has methods that can read integers and floats.
C. Unicode characters are all 16 bits.
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
Servlet has ___________
C. All of the above methods.
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
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
When present, package must be the first no comment statement in the file.
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
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
A catch can have comma-separated multiple arguments.
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
Objects are passed to a method by use of call-by-reference.
What is the correct answer?
4
In RMI before running the client program we must start RMI Registry.
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
A string object can not be modified after it is created.
What is the correct answer?
4
When we invoke repaint () for a Component, the AWT invokes the method:
What is the correct answer?
4
It is an error to catch the same type of exception in two different catch blocks associated with a particular try block.
What is the correct answer?
4
The default case is always required in the switch selection structure.
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
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 methods belong to the String class?
What is the correct answer?
4
All methods in an abstract class must be declared abstract.
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
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
Which of the following keywords are used to control access to a class member?
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
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 will produce a value of 22 if x=22.9:
What is the correct answer?
4
The name of a Java program file must match the name of the class with the extension Java.