Java 2021

1. ++x is equlvalent to :

 
 
 
 

2. What is default return type of a method in java language :

 
 
 
 

3. What are the Valid white space available in java language :

 
 
 
 

4. The Term____related to polymorphism :

 
 
 
 

5. Which statement is correct for length of an array :

 

 
 
 
 

6. When program will be compiled then what will be the part of output , select any one from the followings :

public class less

{

public static void main(String P[])

{

for (int m=0;m<3;m++){

for(int n=3;n>=0;n–){

if(m==n)

break;

System.out.println(m+””+n);

}}}}

 
 
 
 

7. Which code java language supports ?

 
 
 
 

8. Which of the following class are wrapper class ?

 
 
 
 

9. Which Method is mandatory for java standalone Application ?

 
 
 
 

10. Which is the top most class in java class hierarchy ?

 
 
 
 

11. What is the use of access modifier “public” with main method in java language ?

 
 
 
 

12. Which one is the non-primitive data type ?

 
 
 
 

13. What is purpose of resusability in OOPs :

 
 
 
 

14. Which is not related with java from the followings :

 
 
 
 

15. Consider the statement

int a=19;

int b=91;

int c;

c=(a>b)?a:b;

System.out.println(c);

 

What is output ?

 
 
 
 

16. When a thread starts,which method is called automatically to run the Thread :

 
 
 
 

17. What will print on screen when following program will compiled?

public class Myprint

{

public static void main (String K[])

{

int am=0;

boolean b2=true;

boolean b3=false,bu;

b4=(b2 &&((m++)==0));

b4=(b3 &&((m++)==0));

System.out.println(m);

}

}

 
 
 
 

18. What is the output of the following boolean bl ;

System.out.println(bl);

 
 
 
 

19. Name of class , variable, object, method or an interface is calles_____in java language :

 
 
 
 

20. java Remove not referenced objects from memory automatically by using _____:

 
 
 
 

21. What is the extension of the source file of java programmings ?

 
 
 
 

22. What is the output of the following program ?

class ok {

public static void main(String B[])

{

int a, b,c,d=0;

 

c=d++;

b=++c;

a=b++;

System.out.println(a);

}

}

 
 
 
 

23. What will be the output of following program?

(this is correct version of question)

class Myprint

{

public static void main (String K[])

{

int m=0;

boolean b2=true;

boolean b3=false,bu;

boolean b4=(b2 &&((m++)==0));

b4=(b3 &&((m++)==0));

System.out.println(m);

}

}

 

 

 
 
 
 

24. What was the name of the first version of java ?

 
 
 
 

25. Which tool is used to compile the java program ?

 
 
 
 

26. What is the Full Form of AWT ?

 
 
 
 

27. String args[] in main method are used for ______

 
 
 
 

28. What is the extension of the byte code files in java ?

 
 
 
 

29. In Object oriented language , what is true about OOPS :

 
 
 
 

30. When Following will be compiled , then at which line error will be noticed :

public class castprint {

public static void main (string args[] )

{

Char C ;

int K ;

C = ‘A’

K = C;

C = K+10;

++C;

}

}

 
 
 
 

31. When program will be compiled then what will the part of output select any one from the following :

public class count

{

public static void main(String E[])

{

for (int m=0; m<3;m++)

{

for (int n=3;n>0;n–)

{

if(m==n)

continue ;

System.out.println(m+””+n);

}}}}

 
 
 
 

32. Which one of the following is not an object oriented language :

 
 
 
 


Leave a Reply

Your email address will not be published. Required fields are marked *