MCQ

 

1. Which of the following option leads to the portability and security of Java?
2. Which of the following is not OOPS concept in Java?
3. Which concept of Java is a way of converting real world objects in terms of class?
4. Which component is used to compile, debug and execute java program?
5. What is use of interpreter?
6. Which of the following is a valid declaration of an object of class Box?
7. Which of these keywords is used to make a class?
8. What is the return type of Constructors?
9. What is true about constructor?
10 . What would be the output of the following code snippet if variable a=10?
if(a<=0)
{
    if(a==0)
    {
    System.out.print("1 ");
    }
    else
    {
    System.out.println("2 ");
    }

}
System.out.println("3 ");

3
Ans: 3
 

Comments

Popular posts from this blog

ArrayList

Java Collection Framework