WorksheetsJava Lesson 11
Total questions: 10
Worksheet time: 7mins
Which of the following is NOT a data types in java
int
String
number
double
Which of the following is NOT a NON-primitive data type
String
Array
double
class
int sum1 = 100 + 50;
int sum2 = sum1 + 250;
int sum3 = sum2 + sum2;
System.out.println(sum3);
What will be the final output?
950
800
sum2sum2
sum1250
x /= 3
Which of the below statements matches with above statement?
x = 3 / x
x = x / 3
x / 3
x /x = 3
What is the output of below code?
int x = 5;
System.out.println(x++);
System.out.println(x);
5
5
6
6
5
6
6
5
A variable that holds true or false
String
boolean
int
float
Alex Trebek
Which declaration will throw an error?
double num = 8;
int averageGrade = 89.7;
boolean done = false;
String done = "true";
In Java, execution starts from ___________ function.
get()
main()
java()
display()
Java is
platform dependent
platform indeprndent
Operator used to access the members of a class /package
(.) Dot
(,) Comma
