Related Questions
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
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
Declarations can appear anywhere in the body of a Java method.
What is the correct answer?
4
We can over load methods with differences only in their return type.
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
Which of the following are keywords?
What is the correct answer?
4
Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
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
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
It is perfectly legal to refer to any instance variable inside of a static method.
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
To delete a file, we can use an instance of class file.
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
A panel can not be added to another panel.
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
Which of the following statements are valid array declarations?
What is the correct answer?
4
A catch can have comma-separated multiple arguments.
What is the correct answer?
4
A method declared as static can not access non-static class members.
What is the correct answer?
4
The name of the RMI compiler is ___________
What is the correct answer?
4
Every method of a final in class is implicitly final.
What is the correct answer?
4
In RMI we invoke client method from remote server
What is the correct answer?
4
Objects are passed to a method by use of call-by-reference.
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
With javadoc, which of the following denotes a javadoc comment?
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
The setBackground() method is part of the class
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
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
Which of the following string can be used as mode string for creating a RandomAccessFile object?