Java Programming OOPs
Questions 241 to 250
241.
|
Which of
the following is not a valid
String Constant?
|
||||||||||
Consider
the class definition:
public class
MyClass {
int x; int y;
void myprint(){
System.out.println(“x
= ” +x);
System.out.println(“Y = ” +y);
}
}
Which
of the following is a correct way to create an object?
|
|||||||||||
Which
of the following is not true?
|
|||||||||||
Which of
the following is not necessarily
related to RMI?
|
|||||||||||
Which of
the following is not true for a
constructor?
|
|||||||||||
Which of
the following is true for method
overriding?
|
|||||||||||
Consider
the following code:
interface A { int a=5; int b=10;}
Which of
the following is possible for the above?
|
|||||||||||
Which of
the following package is automatically imported to your program file?
|
|||||||||||
Which of
the following is not true for a
java thread?
|
|||||||||||
Which is not a valid operator in Java?
|
Answers
241.
|
Answer : (b)
Reason : ‘x’
is not a valid string constant.
|
Answer : (a)
Reason : correct
way to create an object MyClass mc=new
MyClass();
|
|
Answer : (b)
Reason : Every
time the class is instantiated, a new copy of each of the class variables is
created
|
|
Answer : (c)
Reason : GUI not necessarily related to RMI
|
|
Answer : (d)
Reason : A
constructor can be declared abstract
|
|
Answer : (a)
Reason : A
method in the subclass that has the same name, same arguments and same return
type as a method in the super class is orverridden
|
|
Answer : (a)
Reason : A
is the right choice of declaration.
|
|
Answer : (d)
Reason : the
java.lang package is automatically imported to your program file
|
|
Answer : (a)
Reason : The run method doesnot call start method.
|
|
Answer : (a)
Reason : <>
is not a valid operator in java.
|
thank you.
ReplyDeletejava tutorial
java tutorial