0% found this document useful (0 votes)
3 views

COrejava6

The document contains a series of questions and answers related to Core Java, covering various topics such as expressions, class definitions, method implementations, and Java concepts. Each question includes a correct answer and the user's answer, indicating the user's performance. The questions test knowledge on Java syntax, object-oriented principles, and programming constructs.

Uploaded by

adef17354
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

COrejava6

The document contains a series of questions and answers related to Core Java, covering various topics such as expressions, class definitions, method implementations, and Java concepts. Each question includes a correct answer and the user's answer, indicating the user's performance. The questions test knowledge on Java syntax, object-oriented principles, and programming constructs.

Uploaded by

adef17354
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

dDw tMjIw Njg5MjE

QuestionID : 1183 Subject Name Core Java


Q1. What will be the result of the expression 13 & 25?
1. 38
2. 25
3. 9
4. 12
Correct Answer : 3
Your Answer : 3
QuestionID : 1186 Subject Name Core Java
Q2. Given the following code:
class Base{int x = 10;}
class Derived extends Base{
int x = 20;
public static void main(String args[]){
Base B = new Base();
Derived d = new Derived();
Base bd = new Derived();
System.out.println(b.x. + " " + d.x + " " + bd.x);}}
The above code will produce the output
1. 10 20 20
2. 10 20 10
3. 20 10 20
4. 20 20 10
Correct Answer : 2
Your Answer : 0
QuestionID : 1195 Subject Name Core Java
Q3. If m and n are int type variables, what will be the result of the expression
m < n ? m : n when m = 5 and n = 2?
1. 0
2. 1
3. 2
4. None of the above
Correct Answer : 3
Your Answer : 0
QuestionID : 1199 Subject Name Core Java
Q4. Consider the following code:
if (number >= 0)
if (number > 0)
System.out.println("Number is positive");
else System.out.println("Number is negative");
What will be the output if number is equal to 0?
1. Number is negative
2. Number is positive
3. Both A and B
4. None of the above.
Correct Answer : 1
Your Answer :
QuestionID : 1202 Subject Name Core Java
Q5. What is the error in the following class definitions?
abstract class SY{abstract sum(int x, int y) { }}
1. Class header is not defined properly
2. Constructor is not defined
3. Method is not defined properly
4. No error
Correct Answer : 3
Your Answer :
QuestionID : 1215 Subject Name Core Java
Q6. Package p1 contains the following code:
package p1;
public class Student{Body of student}
class Test{Body of Test}
Now consider the following code:
import p1.*;
class Result{ Student s1; Test t1;}
This code will not compile because
1. Class Result should be declared public.
2. Student class is not available
3. Test class is not available.
4. Result body is not fully defined.
Correct Answer : 3
Your Answer :
QuestionID : 1228 Subject Name Core Java
Q7. We would like to make a member of a class visible in all subclasses
regardless of what package they are in. Which one of the following keywords
would achieve this?
1. private
2. protected
3. public
4. private protected
Correct Answer : 2
Your Answer :
QuestionID : 1246 Subject Name Core Java
Q8. Consider the following class definition:
class student extends String{}
What happens when we try to compile this class?
1. Will not complete because class body is not defined
2. Will not complete because String is abstract.
3. Will not complete because String is final.
4. Will complete successfully.
Correct Answer : 3
Your Answer :
QuestionID : 1250 Subject Name Core Java
Q9. Package p1 contains the following code:
package p1;
public class Student{Body of student}
class Test{Body of Test}
Now consider the following code:
import p1.*;
class Result{ Student s1; Test t1;}
This code will not compile because
1. Class Result should be declared public.
2. Student class is not available
3. Test class is not available.
4. Result body is not fully defined.
Correct Answer : 3
Your Answer :
QuestionID : 1260 Subject Name Core Java
Q10. The default case is always required in the switch selection structure.
Correct Answer : F
Your Answer :
QuestionID : 1269 Subject Name Core Java
Q11. When we implement an interface method, it should be declared as
public.
Correct Answer : T
Your Answer :
QuestionID : 1289 Subject Name Core Java
Q12. A final class may not have any abstract methods.
Correct Answer : T
Your Answer :
QuestionID : 1306 Subject Name Core Java
Q13. Objects are passed to a method by use of call-by-reference.
Correct Answer : T
Your Answer :
QuestionID : 1313 Subject Name Core Java
Q14. Any method in super class can be overridden in its subclass.
Correct Answer : F
Your Answer :
QuestionID : 1314 Subject Name Core Java
Q15. One of the features of Java is that an array can store many different
types of values.
Correct Answer : F
Your Answer :
QuestionID : 1317 Subject Name Core Java
Q16. A method declared as static cannot access non-static class members.
Correct Answer : T
Your Answer :
QuestionID : 1332 Subject Name Core Java
Q17. Which are the valid ways to create DataInputStream streams?
1. new DataInputStream();
2. new DataInputStream("in.dat");
3. new DataInputStream(new File("in.dat"));
4. new DataInputStream(new FileInputStream("in.dat"));
Correct Answer : 4
Your Answer :
QuestionID : 1333 Subject Name Core Java
Q18. DataInput is :
1. an abstract class defined in java.io
2. a class we can use to read primitive data types
3. an interface that defines methods to open files
4. an interface that defines methods to read primitive data types.
Correct Answer : 4
Your Answer :
QuestionID : 1345 Subject Name Core Java
Q19. When we invoke repaint( ) for a Component, the AWT invokes the
method :
1. draw()
2. show()
3. update()
4. paint()
Correct Answer : 3
Your Answer :
QuestionID : 1349 Subject Name Core Java
Q20. The checkboxGroup class is a subclass of the Component class.
Correct Answer : F
Your Answer :
QuestionID : 1367 Subject Name Core Java
Q21. The default layoutmanager of the content pane of a JFrame is the
flowlayout manager.
Correct Answer : F
Your Answer :
QuestionID : 1383 Subject Name Core Java
Q22. When we implement the Runnable interface, we must define the method
:
1. init()
2. run()
3. runnable()
4. resume()
Correct Answer : 2
Your Answer :
QuestionID : 1384 Subject Name Core Java
Q23. Every call to wait has a corresponding call to notify that will eventually
end the waiting.
Correct Answer : T
Your Answer :
QuestionID : 1393 Subject Name Core Java
Q24. A Java monitor must either extend Thread class or implement Runnable
interface
Correct Answer : F
Your Answer :
QuestionID : 9305 Subject Name Core Java
Q25. The following Expression returns TRUE ?
(0.0==-0.0)
Correct Answer : T
Your Answer :
QuestionID : 9322 Subject Name Core Java
Q26. You need to read in lines of a laege text file containing tens of
megabytes of data.
Which of the following would be most suitable for reading such file
1. new FileInputStream("file.name")
2. new InputStreamReader(new FileInputStream("file.name"))
3. new BufferedReader(new FileInputStream("file.name"))
4. new RandomAccessFile raf=new
RandomAccessFile("myfile.txt","+rw");
Correct Answer : 3
Your Answer :
QuestionID : 9325 Subject Name Core Java
Q27. what is the name for the remote object proxy that is used by the cilent
1. skeleton
2. remoteREf
3. marshaledobject
4. stud
Correct Answer : 4
Your Answer :
QuestionID : 9331 Subject Name Core Java
Q28. Which of the following are valid methods?
1. public static void aMethod() {}
2. void static aMethod() {}
3. public private void aMethod() {}
4. private aMethod() {}
Correct Answer : 1
Your Answer :
QuestionID : 9354 Subject Name Core Java
Q29. given the following method, which statements will throw an exception,
assuming assertions are enabled?
static int inv(int value) {
assert value > -50 : value < 100;
return 100/value;
}
1. inv(-50);
2. inv(0);
3. inv(50);
4. both (a) nad (b).
Correct Answer : 4
Your Answer :
QuestionID : 9357 Subject Name Core Java
Q30. Set is the name of collection Interface used to maintain unique element.
Correct Answer : T
Your Answer :
QuestionID : 9358 Subject Name Core Java
Q31. Which of the following java.util classes support internationalisation?
1. Locale
2. ResourceBundle
3. Country
4. Language
Correct Answer : 1
Your Answer :
QuestionID : 9376 Subject Name Core Java
Q32. What are all methods used for Inter thread communication ?
1. wait(),notify(),notifyAll()
2. yield(),resume(),suspend()
3. Both of the above
4. None of the above
Correct Answer : 3
Your Answer :
QuestionID : 9384 Subject Name Core Java
Q33. which statement is true?select the one correct answer
1. no two threads can concurrently executr synchronized mehtods on the
same object.
2. methods declared synchronized methods on the same object
3. synchronized mehtods can only call other synchronized methods
directly
4. inside a synchronized method one assume that no other threads are
currenctly executing any other methods in the same class
Correct Answer : 1
Your Answer :
QuestionID : 9448 Subject Name Core Java
Q34. Same component can be added to more than one container?
Correct Answer : F
Your Answer :
QuestionID : 9492 Subject Name Core Java
Q35. Which one of this is not a legal member declaration with in a class?
1. 1. static int a;
2. 2. final Object [] fudge = { null };
3. 3. abstract int t;
4. 4. native void sneeze();
Correct Answer : 3
Your Answer :
QuestionID : 9506 Subject Name Core Java
Q36. The code below draws a line. What color is the line?
g.setColor(Color.red.green.yellow.red.cyan);
g.drawLine(0,0,100,100);
1. Red
2. Green
3. Black
4. LightGray
Correct Answer : 3
Your Answer :
QuestionID : 9567 Subject Name Core Java
Q37. SSL stands for
1. Secure Server Layer
2. Secure Socket Layer
3. Server Socket Layer
4. Session Service Layer
Correct Answer : 2
Your Answer :
QuestionID : 9585 Subject Name Core Java
Q38. What is result of attempting to compile & run following code:
Class Myclass
{
public static void main(String[] args)
{
for(int i=0;i<10;i++)
{
switch(i)
{
case 0:
System.out.println(i);
}
if(i)
{
System.out.println(i);
}
}
}
}
1. code will fail to compile,owing to illegal switch expression in switch
statement
2. the code will fail to compile,owing to illegal conditional expression in
if statement
3. the code will compile without errorand will print numbers 0 through 10
when run
4. the code will compile without error and will print numbers 1 through
10 when run
Correct Answer : 2
Your Answer :
QuestionID : 9587 Subject Name Core Java
Q39. getByName() throws ____________ Exception
1. UnknownHost
2. illegalAccess
3. NullPointer
4. All of the above
Correct Answer : 1
Your Answer :
QuestionID : 9624 Subject Name Core Java
Q40. which of the following operator can be used both as an integer bit wise
oprator and a boolean logical oprator
1. ^
2. !
3. &
4. ~
Correct Answer : 3
Your Answer :
QuestionID : 9626 Subject Name Core Java
Q41. what will be the result of attempting to compile and run the following
class
public class assignment
{
public static void main(String args[])
{
int a,b,c;
b=10;
a=b=c=20;
System.out.println(a);
}

}
select the one answer
1. the code will fail to compile since the compiler will recognize that the
variable c in the assignment statement a=b=c=20;has not been initialized
2. the code will fail to compile because the assignment statement
a=b=c=20;is illegal.
3. the code will compile correctly and will display 10 when run
4. the code will compile correctly and display 20 when run
Correct Answer : 4
Your Answer :
QuestionID : 9627 Subject Name Core Java
Q42. which of following statements are true?
1. At root of the Collection hierarchy is class called collection
2. the collection interface contains a method called enumerator
3. the iterator method returns an instance of the Vector class
4. The Set interface is designed for unique elements
Correct Answer : 4
Your Answer :
QuestionID : 9639 Subject Name Core Java
Q43. what will the result of attempting to compile and run the following prog.

public class myclass


{
public static void main(String args[])
{
String a,b,c;
c=new String("mouse");
a=new String("cat");
b=a;
a=new String("dog");
c=b;
System.out.println(c);
}
}
select the one answer
1. the program will fail to compile
2. the program will print mouse when run
3. the program will print cat when run
4. the program will print dog when run
Correct Answer : 3
Your Answer :
QuestionID : 9641 Subject Name Core Java
Q44. which of he following is illegal identifier
1. number
2. $$_100
3. all@hands
4. Number
Correct Answer : 3
Your Answer :
QuestionID : 9693 Subject Name Core Java
Q45. Which statements are true.
select the two correct answers.
a)the remainder operator % can only be used with integral operands.
b)identifiers in java are case insensitives.
c)the arithmetic operator *,/ and % have the same level of precedence.
d)a short value ranges from -128 to +127.
e)(+15)is a legal expression.
1. a & d
2. c & e
3. a & e
4. b & d
Correct Answer : 2
Your Answer :
QuestionID : 9714 Subject Name Core Java
Q46. Why might you define a method as native?
1. To get to access hardware that java does not know about.
2. To define a new data type such as an unsigned integer.
3. To overcome the limitation of the private scope of a method
4. None of these.
Correct Answer : 1
Your Answer :
QuestionID : 9781 Subject Name Core Java
Q47. The factory class java.util.Collection.
1. is public
2. implements the java.util.Collection interface.
3. is private
4. none
Correct Answer : 1
Your Answer :
QuestionID : 9790 Subject Name Core Java
Q48. What will happen to Exception object after exception handling.
1. Nothing
2. At times it may get garbage collected
3. it always get garbage collected
4. none of the above
Correct Answer : 2
Your Answer :
QuestionID : 9791 Subject Name Core Java
Q49. Write down the modifier of a method that makes the method available
to all classes in the same package and to all the subclasses of this class.
1. private
2. protected
3. public
4. default
Correct Answer : 2
Your Answer :
QuestionID : 9811 Subject Name Core Java
Q50. Are enterprise bean allowes to use Thread.sleep();
Correct Answer : T
Your Answer :
QuestionID : 9819 Subject Name Core Java
Q51. Consider the statement in your program :
Integer i=new Integer("hi");
1. NumberFormatException is thrown at runtime
2. compile time error
3. i contains any garbage
4. none
Correct Answer : 1
Your Answer :
QuestionID : 9836 Subject Name Core Java
Q52. Which of the following wrapper classes have a booleanValue() method?
1. All wrapper classes
2. All wrapper classes except void
3. All wrapper classes that also implement the compareTo() method
4. only the class Boolean
Correct Answer : 4
Your Answer :
QuestionID : 9839 Subject Name Core Java
Q53. A variable declared inside a method must be initialised at the time of
declaretion?
Correct Answer : T
Your Answer :
QuestionID : 9841 Subject Name Core Java
Q54. StringBuffer is a peer class of String class.
Correct Answer : T
Your Answer :
QuestionID : 9842 Subject Name Core Java
Q55. Which of the following return true?

A) "john" == "john"
B) "john".equals("john")
C) "john" = "john"
D) both A and B
1. A
2. B
3. C
4. D
Correct Answer : 4
Your Answer :
QuestionID : 9850 Subject Name Core Java
Q56. Which mostly closely matches a description of java map?
1. a vector of array for 2D geographic represtation
2. A class for containing unique array element
3. A class for containing unique vector element
4. An interface that ensure that implementing class cannot duplicate keys
Correct Answer : 4
Your Answer :
QuestionID : 9884 Subject Name Core Java
Q57. The following code will print
1: int i = 1;
2: i <<= 31;
3: i >>= 31;
4: i >>= 1;
5:
6: int j = 1;
7: j >>= 31;
8: j >>= 31;
9:
10: System.out.println("i = " +i );
11: System.out.println("j = " +j);
1. i = 1
j=1
2. i = -1
j=1
3. i = 1
j = -1
4. i = -1
j=0
Correct Answer : 4
Your Answer :
QuestionID : 9885 Subject Name Core Java
Q58. Given the following classes defined in separate files:

class Vehicle{
public void drive(){
System.out.println("Vehicle: drive");
}
}

class Car extends Vehicle{


public void drive(){
System.out.println("Car: drive");
}
}

public class Test{


public static void main (String args []) {
Vehicle v;
Car c;
v = new Vehicle();
c = new Car();
v.drive();
c.drive();
v = c;
v.drive();
}
}

What will be the effect of compiling and running this class Test?
1. Generates a Compiler error on the statement v= c;
2. Generates runtime error on the statement v= c;
3. Prints out:
Vehicle: drive
Car: drive
Car: drive
4. Prints out:
Vehicle: drive
Car: drive
Vehicle: drive
Correct Answer : 3
Your Answer :
QuestionID : 9886 Subject Name Core Java
Q59. An anonymous class provides________interface implementation and
___
arguments are passed.
1. single,0
2. single,1
3. multiple,0
4. multiple,1
Correct Answer : 1
Your Answer :
QuestionID : 9904 Subject Name Core Java
Q60. class test
{
public static void main(String[] args)
{
int i=10;
int j=20;
System.out.println(i++ + ++j + i++);
}
}
1. 41
2. 42
3. 40
4. 43
Correct Answer : 2
Your Answer :
QuestionID : 9907 Subject Name Core Java
Q61. A reference type or object can never be casted to primitive type.
Correct Answer : T
Your Answer :
QuestionID : 9908 Subject Name Core Java
Q62. Nested classes were allowed by original 1.0 specification for java.
Correct Answer : F
Your Answer :
QuestionID : 9920 Subject Name Core Java
Q63. What will be the output?
class abc
{
public static void main(String[] args)
{
String str=new String("Hello");
str.concat("Hi");
System.out.println(str);
}
}
1. Hi
2. HelloHi
3. Hello
4. Compile Error-no method like concat().
Correct Answer : 3
Your Answer :
QuestionID : 9925 Subject Name Core Java
Q64. Once string object is created, its contents cannot be altered.
Correct Answer : T
Your Answer :
QuestionID : 9929 Subject Name Core Java
Q65. Which of the following do not lead to a runtime error?

A) "john" + " was " + " here"


B) "john" + 3
C) 3 + 5
D) 5 + 5.5
Select all correct answers.
i) Only A
ii) A,B
iii) B,C,D
iv) All
1. i
2. ii
3. iii
4. all of the above
Correct Answer : 4
Your Answer :
QuestionID : 9938 Subject Name Core Java
Q66. The layout of a container can be altered using which of the following
methods:
1. setLayout(aLayoutManager);
2. addLayout(aLayoutManager);
3. layout(aLayoutManager);
4. setLayoutManager(aLayoutManager);
Correct Answer : 1
Your Answer :
QuestionID : 9940 Subject Name Core Java
Q67. main thread has priority__.
1. 4
2. 5
3. 7
4. 6
Correct Answer : 2
Your Answer :
QuestionID : 9949 Subject Name Core Java
Q68. Which of the java.util classes support internationalisation?
1. Locale
2. Language
3. country
4. Internatinal
Correct Answer : 1
Your Answer :
QuestionID : 9955 Subject Name Core Java
Q69. Which of the wrapper classes have booleanValue() method?
1. All wrapper classes
2. All wrapper classes except Void
3. All wrapper classes that also implement compareTo() method.
4. Only the class Boolean.
Correct Answer : 4
Your Answer :
QuestionID : 9971 Subject Name Core Java
Q70. class test
{
public static void main(String[] args)
{
int arr[][2] = {10,20,30,40,50};
}
}
1. Compiled successfully
2. Compilation error
3. Runtime error
4. Throws Exception
Correct Answer : 2
Your Answer :
QuestionID : 9972 Subject Name Core Java
Q71. An interface can extend any number of interfaces and can be
extended by any number of inetrfaces.
Correct Answer : T
Your Answer :
QuestionID : 9975 Subject Name Core Java
Q72. Which of these Listener classes have corresponding
adapter classes:-
(A)ContainerListener
(B)TextListener
(C)ItemListener
(D)MouseMotionListener
1. a,d
2. b,d
3. c,d
4. b,d
Correct Answer : 1
Your Answer :
QuestionID : 10001 Subject Name Core Java
Q73. public class onesix {
public static void main(String [] s)
{
boolean a=true;
boolean b=false;
boolean c=true;
if(a==true)
if(b==true)
if(c==true)
System.out.println("one");
else
System.out.println("two");
else if(a&&(b=c))
System.out.println("three");
else
System.out.println("four");
}
}

What will be the output?


1. one
2. two
3. three
4. four
Correct Answer : 3
Your Answer :
QuestionID : 10010 Subject Name Core Java
Q74. Given that Thing is a class, how many objects and how many reference
variables are created by the following code?Thing item, stuff;item = new
Thing();Thing entity = new Thing();
1. a. One object is created.
2. b. Two objects are created.
3. c. Three objects are created.
4. d. One reference variable is created.
Correct Answer : 2
Your Answer :
QuestionID : 10037 Subject Name Core Java
Q75. The bytecodes in the java has ________ instruction set.
1. 220
2. 200
3. 210
4. 201
Correct Answer : 1
Your Answer :
QuestionID : 10044 Subject Name Core Java
Q76. First four bytes of class file is ___________.
1. magic number.
2. program pointer.
3. name of the file
4. none of the above.
Correct Answer : 1
Your Answer :
QuestionID : 10093 Subject Name Core Java
Q77. From which of the following locations can an RMI server NOT load
classes?
1. The CLASSPATH of an RMI client
2. The CLASSPATH of the RMI server
3. From an HTTP or FTP server on the network at a location specified by
the client
4. From an HTTP or FTP server on the network at a location specified by
the server
Correct Answer : 1
Your Answer :
QuestionID : 10103 Subject Name Core Java
Q78. Which of the following statments are true?
i.java uses a system called UTF for I/O to support international character sets
ii.The RandomAcessFile is the most sutitable class for support international
character sets
iii.An instance of FileInputstream may not be chained to an instance of
FileOutputStream
iv.File I/O activites requries use of Exception handling

1. i,iii
2. i,iv
3. i,iii,iv
4. i,ii,iii,iv
Correct Answer : 3
Your Answer :
QuestionID : 10105 Subject Name Core Java
Q79. Asuume any exception handling has been set up,which of the following
will create an instance of the RandomAcess File class
1. RandomAcessFile raf=new RandomAcessFile("myfile.txt","rw");
2. RandomAcessFile raf=new RandomAcessFile(new
DataInputStream());
3. RandomAcessFile raf=new RandomAcessFile("myfile.txt");
4. RandomAcessFile raf=new RandomAcessFile(new Fle("myfile.txt"));
Correct Answer : 1
Your Answer :
QuestionID : 10114 Subject Name Core Java
Q80. Which of the following statments are true?
1. A method can not be overloaded to be less public in a child class
2. To be overridden a method must have the same name and the
parameter and return types
3. To be overridden a method only needs the same name and the
parameter types
4. To be overridden a method must have the same name and the
parameter names and return types
Correct Answer : 2
Your Answer :
QuestionID : 10134 Subject Name Core Java
Q81. static inner class object can be created inside its outer class.
Correct Answer : T
Your Answer :
QuestionID : 10202 Subject Name Core Java
Q82. Select true statement
a>new & delete are keywords in Java
b>return,goto & default are keywords in Java
c>static,unsigned & long are keywords in Java
d>try,catch & thrown are keywords in Java
1. a,b,c
2. a,b
3. only b
4. only d
Correct Answer : 3
Your Answer :
QuestionID : 10206 Subject Name Core Java
Q83. which of these are core interfaces in collection framework
1. set,collection,map
2. bag
3. linkedlist
4. none
Correct Answer : 1
Your Answer :
QuestionID : 10244 Subject Name Core Java
Q84. What will be output;
class test
{ static int k;
public static void main(String[] args)
{ int i=10,j=5,l=6;
k= i < j?i:i > l?1:0;
System.out.println(k);
}
}
1. 0
2. 1
3. 10
4. 6
Correct Answer : 2
Your Answer :
QuestionID : 10275 Subject Name Core Java
Q85. Which colour is used to indicate instance methods in the standard
"javadoc" format documentation:
1. blue
2. red
3. purple
4. orange
Correct Answer : 2
Your Answer :
QuestionID : 10460 Subject Name Core Java
Q86. ________ Class is Super class for all java exception classes
1. Throwable
2. Throw
3. ThrowsException
4. all
Correct Answer : 1
Your Answer :
QuestionID : 10462 Subject Name Core Java
Q87. Inner class in java can be Static?
Correct Answer : T
Your Answer :
QuestionID : 10486 Subject Name Core Java
Q88. UDP is connectionless protocol
Correct Answer : T
Your Answer :
QuestionID : 10487 Subject Name Core Java
Q89. To create the TCP-IP stream transport layer is responsibe
Correct Answer : F
Your Answer :
QuestionID : 10491 Subject Name Core Java
Q90. When an applet begins awt call following sequence of method.
1. init(),paint(),destroy
2. init(),start(),paint(),stop(),destroy
3. init(),service(),destroy
4. init(),start(),stop(),destroy
Correct Answer : 2
Your Answer :
QuestionID : 10496 Subject Name Core Java
Q91. name of class file of inner class contain which of the
following character.
1. %
2. @
3. $
4. none of the above.
Correct Answer : 3
Your Answer :
QuestionID : 10508 Subject Name Core Java
Q92. What is the output of the following program?
class test
{
int i=(int)34.3E38
System.out.println(i);

}
1. It is equal to maximum value of the integer;
2. It gives Runtime Error.Value is greator than limits of Integer .
3. It gives Compile time error.Value is greator than limits of Integer.
4. 343000000
Correct Answer : 1
Your Answer :
QuestionID : 10514 Subject Name Core Java
Q93. Read object method reconstructs object at the time of retriving from the
file.
1. bit by bit
2. Byte by Byte
3. Whole object at a time.
4. Element by Element
Correct Answer : 2
Your Answer :
QuestionID : 10973 Subject Name Core Java
Q94. RandomAccess is a marker interface used by List implementations to
indicate that they support fast random access.
Correct Answer : T
Your Answer :
QuestionID : 10975 Subject Name Core Java
Q95. Which of the following methods will give you an error when placed at
line no 10?
Select one correct answer.
1 class A
2{
3 public void callme()
4{
5 System.out.println("A");
6}
7}
8 class B extends A
9{
10 //Here
11 }
1. public final void callme() {}
2. void callMe() {}
3. void callme(int a) {}
4. void callme() {}
Correct Answer : 4
Your Answer :
QuestionID : 10980 Subject Name Core Java
Q96. Which of the following a valid adapter class?
1. ActionAdapter
2. AdjustmentAdapter
3. KeyAdapter
4. TextAdapter
Correct Answer : 3
Your Answer :
QuestionID : 10989 Subject Name Core Java
Q97. Every Applate that u create must be a subclass of Applate
Correct Answer : T
Your Answer :
QuestionID : 10993 Subject Name Core Java
Q98. methods in interface can be static
Correct Answer : F
Your Answer :
QuestionID : 10996 Subject Name Core Java
Q99. inner classes can access only static members of outer class
Correct Answer : F
Your Answer :
QuestionID : 11004 Subject Name Core Java
Q100. Dictinary is a class of java.util package
Correct Answer : T
Your Answer :

You might also like