Related Questions
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
A package is a collection of
D. classes and interfaces
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
A string object can not be modified after it is created.
What is the correct answer?
4
The programmer must explicitly create the system .in and system .out objects.
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
Any method in a supper class can be over ridden in its subclass.
What is the correct answer?
4
All methods in an abstract class must be declared abstract.
What is the correct answer?
4
Throwing an exception always causes program termination.
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
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
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
Which of the following methods can be used to remove a component from the display?
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
class.forName(...) creates an instance of java ODBC driver
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.
What is the correct answer?
4
Which of the following statements are valid array declarations?
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
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
Declarations can appear anywhere in the body of a Java method.
What is the correct answer?
4
Which of the following are keywords?
What is the correct answer?
4
The setBackground() method is part of the class
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
Which of the following represent legal flow control statements?
What is the correct answer?
4
Any class may be inherited by another class in the same package.
What is the correct answer?
4
The concept of multiple inheritance is implemented in Java by
A. extending two or more classes
B. extending one class and implementing one or more interfaces
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
Which exception is thrown by the read() method of InputStream class?
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
executeUpdate automatically updates data because___________
A. auto commit is on, by default
B. It performs a hidden commit statement as well