Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

comp sci java

Total questions: 24

Worksheet time: 12mins

Name
Class
Date
1.
 This is valid
byte bite = 128
a)
true
b)
false
2.
 The reference variable is permanent ... 
a)
False
b)
true
3.
 An integer can not be stored in a byte.
a)
false
b)
true
4.
 A short is not the smallest type of data
a)
true
b)
false
5.
 There are seven different ways to use a "\"
a)
false
b)
true
6.
 Each line of code requires a colon at the end of it
a)
true
b)
false
7.
 There are 2 different ways to set a comment
a)
true
b)
false
8.
 You always put a semicolon before opening a { brace
a)
false
b)
true
9.
 Integer types doesn't have to store integer values
a)
false
b)
true
10.
 'c' is 66
a)
true
b)
false
11.
 Indenting keeps your code neat
a)
true
b)
false
12.
 all java programs start with a system
a)
true
b)
false
13.
what does the command /t mean
a)
tab
b)
twirl
c)
browse
d)
none
14.
What will be the output of this line of code?
System.out.printls("Chips")
a)
error
b)
CHIPS
c)
chips
d)
more Chips
15.
What is the best description of what a variable is?
a)
storage location for a specified type of value
b)
random access memory 
c)
p
d)
none of above
16.
What letter is 65 in char?
a)
' A'
b)
'D'
c)
'B'
d)
'C'
17.
Which of the following is not a variable type?
a)
char
b)
flot
c)
soap
d)
int
18.
How many primitive data types are there in JAVA?
a)
<4
b)
6
c)
8
d)
101
19.
String bob = "the builder";
System.out.println(bob);
a)
the builder
b)
error
c)
Monty pythone 
d)
bob
20.
What is the memory usage for long?
a)
51
b)
64
c)
915
d)
-108
21.
What is the memory usage for int?
a)
32
b)
64
c)
81
d)
72
22.
The maximum value for char is_________.
a)
long
b)
65535
c)
9137
d)
yes
23.
 you must put a (blank) at the end of all java program statements
a)
:
b)
;
c)
:)
d)
{
24.
 \\ gives you a (blank)
a)
/
b)
|
c)
\
d)
42