Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
Give this quiz to my class
Q 1/20
Score 0
To prevent any method from overriding, we declare the method as
30
friend
abstract
static
final
Q 2/20
Score 0
Which statement is not true in java language?
30
A private member of a class cannot be accessed from its derived class.
A private member of a class cannot be accessed by the methods of the same class.
A public member of a class can be accessed in all the packages.
A protected member of a class can be accessed from its derived class.
20 questions
Q.
To prevent any method from overriding, we declare the method as
1
30 sec
Q.
Which statement is not true in java language?
2
30 sec
Q.
Which of the following is true
3
30 sec
Q.
A constructor
4
30 sec
Q.
What is the bytecode in the context of JAVA
5
30 sec
Q.
In java, objects are passed as
6
30 sec
Q.
public static void main(String args[])
{
int a=2, b=3;
if (a==3)
if (b==3)
System.out.println("HAI");
else
System.out.println("WELCOME");
System.out.println("JAVA");
}
}
7
30 sec
Q.
In Java, a character constant’s value is its integer value in the ………………………character set.
8
30 sec
Q.
Which feature comes under compile time polymorphism
9
30 sec
Q.
Which is the right naming convention for method in Java?
10
30 sec
Q.
Which of these cannot be declared static?
11
30 sec
Q.
An anonymous class in Java is
12
30 sec
Q.
ArrayList list = new ArrayList<>();
list.add("Java");
list.add("Python");
System.out.println(list.remove(0));
13
30 sec
Q.
Which of the following keywords is used to prevent inheritance
14
30 sec
Q.
import java.util.*;
class Test {
public static void main(String[] args) {
ArrayList al = new ArrayList();
al.add("A");
al.add(10);
al.add(10.5);
al.add(true);
System.out.println(al); } }
15
30 sec
Q.
public class Test {
public static void main(String[] args) {
String s = new String("5");
System.out.println(1 + 10 + s + 1 + 10);
}
}
16
30 sec
Q.
public class Test {
public static void main(String[] args) {
String s1 = null;
System.out.println(s1); //line 2
System.out.println(s1.toString()); //line 3
}
}
17
30 sec
Q.
What is the difference between StringBuilder and StringBuffer in Java
18
30 sec
Q.
What happens when two String objects are concatenated using the + operator in Java