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/25
Score 0
Which of the following is not a Java feature?
30
Dynamic
Structures
Architecture Neutral
Portable
Q 2/25
Score 0
abstract keyword can be used on
30
(a) Class only
(b) Methods only
Both A & B.
(c) variables only
25 questions
Q.
Which of the following is not a Java feature?
1
30 sec
Q.
abstract keyword can be used on
2
30 sec
Q.
When does Exceptions in Java arises in code sequence?
3
30 sec
Q.
What of the following is the default value of a local variable?
4
30 sec
Q.
Which of the following is true about public access modifier?
5
30 sec
Q.
Which of the following is true about String?
6
30 sec
Q.
What is instance variable?
7
30 sec
Q.
Which of the following is illegal?
8
30 sec
Q.
Under a what situation do you obtain a default Contructor?
9
30 sec
Q.
class Hai {
static int a;
public static void main(String[] args) {
a=a+2;
System.out.println(a);
}
}
10
30 sec
Q.
class Base {
public void show() {
System.out.println("Base::show() called");
}
}
class Derived extends Base {
public void show() {
System.out.println("Derived::show() called");
}
}
public class Main {
public static void main(String[] args) {
Base b = new Derived();;
b.show();
}
}
11
30 sec
Q.
Which of the following is true about inheritance in Java? 1) Private methods are final.
2) Protected members are accessible within a package and
inherited classes outside the package.
3) Protected methods are final.
4) We cannot override private methods.
12
30 sec
Q.
Which of the following is FALSE about arrays in Java?
13
30 sec
Q.
class Test {
public static void main (String[] args) {
int arr[2];
System.out.println(arr[0]);
System.out.println(arr[1]);
}
}
14
30 sec
Q.
import java.io.*;
class Array_Val {
public static void main (String[] args) {
int arr1[] = {1, 2, 3};
int arr2[] = {1, 2, 3};
if (arr1 == arr2)
System.out.println("Same");
else
System.out.println("Not same");
}
}
15
30 sec
Q.
class Test {
public static void main(String[] args) {
System.out.println("Hello, World!");
for(int i = 0; 0; i++)
{
System.out.println("Hello");
break;
}
}
}
16
30 sec
Q.
What is the output of the below Java code snippet?
int a = 2 - - 7;
System.out.println(a);
17
30 sec
Q.
Byte code is the result of?
18
30 sec
Q.
What software compiles a Java Program?
19
30 sec
Q.
What is the use of Access modifier "pubic" in main in Java language?
20
30 sec
Q.
What is Literal in Java?
21
30 sec
Q.
What is the prefix used to represent Hexadecimal numbers in Java?
22
30 sec
Q.
What is the name given to character literals in Java that start with a Back Slash character?