WorksheetsTech Linguist E-Quiz JAVA
Total questions: 25
Worksheet time: 16mins
which of the following is wrapper class in java
Float
Integer
Double
all of above
which one of the following is true?
runnable interface declares the start method
Thread.start() method is used to move a thread from a new state to the runnable state
Thread.runnable() method is used to move a thread from new state to the runnable state
Thread.run() method is used to move a thread from new state to the runnable state
Which one of the following statement is not true about the collection interface?
all methods defined in set interface are also defined in collection interface
list interface extends collection interface
set interface extends collection interface
all methods defined in list interface are also defined in collection interface
which one of the following is a legal decelration of a two- dimensional array of integers
int[] a[] = new int[5][];
int[5][5] a = new int[][];
int a = new int[5,5];
int[][] a = new int[][5];
which interface needs to be implemented in order to make an object seralized
clonnable
remote
seralizable
none of the above
superclass of all classes representing the output stream of characters is -------------
OutputStream
Reader
InputStream
Writer
which of this class is used by character streams for reading data from buffer
BufferReader
InputStreamReader
FileReader
FileInputStream
which one this keywords are used to create a class in java
class
struct
int
none of the avove
which one of these events will cause the thread to die?
on calling the sleep() method.
when the execution of the run() method ends
when the execution of the start() method ends
on calling the wait() method
which one of the following have elements in insertion order
sorted map
hashmap
linkedhashmap
treemap
Java was originally named:
Coffee
Oak
New C++
Duke
Is Android based on Java?
True
False
When was Java released?
1975
1985
1995
2005
2015
We use Scanner Library in java for...
Give permissions to the user
Correcting software errors
Allows user to read data
Allows the user to enter data
ar, given the following declaration:int[] ar = {2, 4, 6, 8 }0, 1, 2, 31, 2, 3, 40, 2, 4, 6For the array:
int stats[3];
What is the range of the index?
0 to 3
0 to 2
1 to 3
0 to 4
float myFloatNum = 5.99f;
System.out.println(myFloatNum);
What will be the output?
5.99
5.99f
"5.99"
"5.99"f
int sum1 = 100 + 50;
int sum2 = sum1 + 250;
int sum3 = sum2 + sum2;
System.out.println(sum3);
What will be the final output?
950
800
sum2sum2
sum1250
What is the output of below code?
int x = 5;
System.out.println(x++);
System.out.println(x);
5
5
6
6
5
6
6
5
Class Cat extends Animal. Which is NOT a valid declaration?
Cat x = new Cat();
Animal X = new Animal();
Cat x = new Animal();
Animal x = new Cat();
Fix the syntax error in Line 8.
Cylinder sc = new System.in( );
Scanner sc = new Scanner (System.in);
Cylinder Volume = new Volume( );
Cylinder call = new Cylinder( );
