Java Online Quiz

Below are the instructions for this quiz:

  • Time Limit for this Quiz is 30 minutes
  • This quiz has 20 questions
  • Multiple choice questions
  • Multiple attempts are allowed
Enter your Email:
1.
[ Java ]
Which Java declaration will return syntax error?
2.
[ Java ]
What is the difference between Vector and ArrayList?
3.
[ Java ]
Create a set of strings and add the string "def" three times to this set, then remove an "def" string. What will happen when size() method is called on this set?
4.
[ Java ]
What is @Override annotation?
5.
[ Java ]
Which of the following code snippets will compile?
6.
[ Java ]
What is correct variable type for the result?... variable = 5 + 0.11;
7.
[ Java ]
When is an object's finalize method called?
8.
[ Java ]
Which of the following code snippets would compile successfully?
9.
[ Java ]
In the following code. Who has access to member num?package car;
public class Audi {
   int num;
}
10.
[ Java ]
What happens when we try to add the same element twice to a Set?
11.
[ Java ]
What is the output for the below code?public class Test{
    public static void main(String[] args){
            Integer i = Integer.valueOf("1");
            if(i.toString()=="1")
               System.out.println("Equal");
            else
                System.out.println("Not Equal");
     }
}
12.
[ Java ]
Which Java class provides variables local to each thread?
13.
[ Java ]
Which of the following statements is true?
14.
[ Java ]
Which one these is a valid keyword in Java?
15.
[ Java ]
Which of the following declaration is correct?
16.
[ Java ]
What modifier is used to provide access to a method within the class and all the extending classes?
17.
[ Java ]
What is the command to run a JAR file application?
18.
[ Java ]
What is the output of the following class?public class Test{
    public Test() {
         int x = 5;
         return x;
    }
  public static void main(String[] args){
       System.out.println(new Test());
   }
}
19.
[ Java ]
There is a class with private constructors only. How can we provide a way to create instance of this class?
20.
[ Java ]
Which member of an abstract class can be abstract?

Share

Bijan Patel

Founder & Creator of QAScript | 12+ years of IT Experience | Full Stack Automation Engineer | Blogger | Trainer

You may also like...

Leave a Reply

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

error: Content is protected !!