NEW
Font size
WorksheetsGrade 11(Quiz 1)
Total questions: 20
Worksheet time: 15mins
How do you create a variable with the numeric value 5?
float x = 5;
x = 5;
int x = 5;
num x = 5
Which data type is used to create a variable that should store text?
myString
String
Txt
string
How do you insert COMMENTS in Java code?
# This is a comment
/* This is a comment
// This is a comment
Where does a java program start executing instructions from:
class
source file
main method
object
Java is short for "JavaScript".
true
false
How do you insert COMMENTS in Java code?
# This is a comment
/* This is a comment
// This is a comment
Which data type is used to create a variable that should store text?
myString
String
Txt
string
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
Which of the following is assignment operator?
==
=
=+
++
int x = 10;
x = x + 5;
System.out.println(x);
What will be the output?
15
5
55
x5
int x = 5;
int y = 6
int z = 50;
System.out.println(x + y + z);
What will be the output?
61
5650
66
x + y + z
