Q.1.
Which of these is not a Thread state?
Q.2.
Which of the following is incorrect?
Q.3.
What is modulo operation used for ?
Q.4.
Is String a primitive data type?
Q.5.
Which of the following for loop declaration is not valid?
Q.6.
What does the expression float a =/ 0 return?
Q.7.
Class Cat extends Animal. Which is NOT a valid declaration?
Q.8.
The following Syntax is used for?class Subclass-name extends Superclass-name { //methods and fields }
Q.9.
Does a programmer always know how long an array will be when the program is being written?
Q.10.
String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";What is the correct way to find the length of "txt" string?
Q.11.
Create an array ofstrings called months.
Q.12.
Synchronized static methods acquire lock on
Q.13.
Which of the following option leads to the portability and security of Java?
Q.14.
Int [] nums = {11};How would you access the fourth element in nums?
Q.15.
What will the following program segment display?for(int a =a <=a += 3)System.out.print(a+””);
Q.16.
What is the length of the following array: byte[] data = {-};
Q.17.
Which method is used to get current running thread object?
Q.18.
Which of the following concepts of OOPS means exposing only necessary information to client?
Q.19.
What is use of interpreter?
Q.20.
Which method is called internally by Thread start() method?