Font size
WorksheetsT_4.2 Identifier, Data Types, Operators & Expressions
Total questions: 10
Worksheet time: 7mins
Identify VALID identifier.
24Century
sum_&_difference
double
MyVariable
Create a variable called myNum of type int and assign it the value 15
(a)
Declare a constant for PI with value 3.142
(a)
Tick all the Java reserved words.
enum
const
float
num
Select primitive data types.
int
float/double
boolean
char
String
What is the function for escape sequence \n ?
insert a tab in the text
insert a new line in the text
insert a new space in the text
insert a double line in the text
It is given that
a = 5, b = 2, c = 4 and d = 6
What is the result for this relational expressions?
a * c != d * b
true
false
Check whether the following expression return true or false.
(5 > 3) && (8 < 5)
true
false
Which one is arithmetic expression?
3 == 5
b * c - d
!(a > b)
cx +dax2 + b
Based on algebraic expression above, tick the correct Java expression.
(a * x * x + b) / ((c * x + d)
(a * Math.pow(x,2) + b) / (c * x + d)
((a)(x)(x) + (b)) / ((c)(x) + d)
(b + x *(x * (a))) / (d + x * (c))
