CoderMantra

Menu
  • Home
  • Quiz
  • How-To
  • Q/A
  • Blog

java exam

0 votes, 0 avg
350
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Java Questions

1 / 15

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

2 / 15

2. Which of these method of Object class can clone an object?

3 / 15

3.  Which variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed?

4 / 15

4. What is the syntax for java main method?

5 / 15

5. What is the process of defining a method in terms of itself, that is a method that calls itself?

6 / 15

6. Which mechanism is used when a thread is paused running in its critical section and another thread is allowed to enter (or lock) in the same critical section to be executed?

7 / 15

7. Which of these is correct way of calling a constructor having no parameters, of superclass A by subclass B?

8 / 15

8. What is not the use of “this” keyword in Java?

9 / 15

9. Find the output of the following code.

        class output 

        {

            public static void main(String args[])

            { 

               StringBuffer s1 = new StringBuffer("Quiz");

               StringBuffer s2 = s1.reverse();

               System.out.println(s2);

            }

        }

10 / 15

10. How is Date stored in database?

11 / 15

11. What will be the output of the following Java code?

        class test 

        {

            int a;

            int b;

            void meth(int i , int j) 

            {

                i *= 2;

                j /= 2;

            }          

        }    

        class Output 

        {

            public static void main(String args[])

            {

                test obj = new test();

    	    int a = 10;

                int b = 20;             

                obj.meth(a , b);

                System.out.println(a + " " + b);        

            } 

        }

12 / 15

12. What will be the output of the following Java code snippet?

    class abc

    {

        public static void main(String args[])

        {

            if(args.length>0)

            System.out.println(args.length);

        }

    }

13 / 15

13. Which of these can be used to differentiate two or more methods having the same name?

14 / 15

14. Find the output of the following program.

public class Solution{
       public static void main(String[] args){
                     byte x = 127;
                     x++;
                     x++;
                     System.out.print(x);
       }
}

15 / 15

15. What is Recursion in Java?

Your score is

The average score is 36%

LinkedIn Facebook VKontakte
0%

By Wordpress Quiz plugin

Category

  • AI
  • Assignments
    • C Language Assignments
    • C++ Assignments
    • Java Assignments
    • Python Assignments
  • C Programming
  • c-plus-plus-Assignments
  • C++
  • Core Java
  • Data Structure
  • Data Structure In C++
  • How To
  • Java-Assignments
  • node js questions
  • nodejs assignments
  • nodejs Projects
  • Practice Questions
  • Python Tutorial
  • Python-Assignments
  • Questions
  • Quiz
  • sql-functions
  • SQL-Tutorial
  • Tkinter Tutorial
  • Uncategorized
  • What Is
  • Why

Archives

  • October 2025
  • September 2025
  • July 2025
  • April 2025
  • October 2024
  • September 2024
  • June 2024
  • April 2024
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • May 2022
  • November 2021
  • May 2021
  • March 2021
  • November 2020
  • October 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • August 2019
  • May 2019
  • March 2019
  • February 2019
  • January 2019
About CoderMantra

Coder Mantra is a unique e-learning website, offers a tutorial of different popular programming languages with examples. The code on this popular tutorial website is tested and executed.

Latest Posts
Binary Search Tree Traversal in Java October 21, 2025
Tree in Data Structure – A Complete Guide with Examples October 3, 2025
What is Generative AI? Explained with Simple Examples. September 25, 2025
Double Linked List in Java. July 15, 2025
Contact Us

info@codermantra.com

admin@codermantra.com

© 2020 Coder Mantra . All Rights Reserved
About | Privacy Policy | Terms | Contact