WorksheetsProgramming Basics
Total questions: 10
Worksheet time: 4mins
Name
Class
Date
1.
Every statement in Java language should end with a?
a)
Dot or Period
b)
Comma
c)
Semicolon
d)
Colon
2.
When we want to print in Java, we use the code ......
a)
system.out.print();
b)
System.out.println();
c)
System.Out.Printf();
d)
System.out.show();
3.
_________ operator returns the remainder after division
a)
+
b)
/
c)
%
d)
*
4.
________ operator is used to check the equality of two values
a)
>=
b)
=
c)
*=
d)
==
5.
int x = 5;
int y = 6
int z = 50;
System.out.println(x + y + z);
What will be the output?
a)
61
b)
5650
c)
66
d)
x + y + z
6.
int x = 4;
System.out.println(x < 5 && x < 10);
What will be the output?
a)
false
b)
true
c)
4
d)
x < 5 && x < 10
7.
int x = 4.4;
int y = 5.5;
System.out.println(x == y);
What will be the output?
a)
4.4
b)
true
c)
false
d)
5.5
8.
which type of operator it is? i + =5
a)
addition assignment operator
b)
conditional operator
c)
arithmetic operator
d)
equality operator
9.
Calculate the value of x, when
int a=2, b=3;
x= a++ * ++b;
(a)
10.
An (a) is a symbol or token, which performs arithmetical or logical operations and gives meaningful result.
100 %
