Java Quiz

0 votes, 0 avg
418

Java Questions

1 / 15

1. Which of the following are not java modifiers?

2 / 15

2. Which of the following is true in regard to applet execution?

3 / 15

3. The following Syntax is used for?

class Subclass-name extends Superclass-name   {                     //methods and fields }

4 / 15

4. Which of these method of class String is used to remove leading and trailing whitespaces?

5 / 15

5. What is the syntax for java main method?

6 / 15

6. Which of the following is true about public access modifier?

7 / 15

7. What is the process of defining two or more methods within same class that have same name but different parameters declaration?

8 / 15

8. Which of these data types is used to store command line arguments?

9 / 15

9. Identify the modifier which cannot be used for constructor.

10 / 15

10. Identify the output of the following program.

String str = “Hellow”;
System.out.println(str.indexOf(‘t));

11 / 15

11. Which of these is not a correct statement?

12 / 15

12. Which data type value is returned by all transcendental math functions?

13 / 15

13. Which of the following is a type of polymorphism in Java?

14 / 15

14. Find the output of the following program.

public class Solution{
       public static void main(String[] args){
                     short x = 10;
                     x =  x * 5;
                     System.out.print(x);
       }
}

15 / 15

15. Which of these keywords are used for the block to be examined for exceptions?

Your score is

The average score is 36%

0%

Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.

Scroll to Top