Twa kɔ nsɛm atitiriw so
Log in
Sign up for FREE
arrow_back
Laabri

Syntax/Output and Variable Test

star
star
star
star
star
Last updated about 2 years ago
20 Nsɛmmisa
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
Asemmisa {{asɛmmisaAhyɛnsode}}
1.

What is the output by the code below?

System.out.println( 3 + " " + 3 );

Asemmisa {{asɛmmisaAhyɛnsode}}
2.

What is the ASCII value of a space?

Asemmisa {{asɛmmisaAhyɛnsode}}
3.

Which of the following would print one backslash on the screen if used in a print( ) or println( )?

Asemmisa {{asɛmmisaAhyɛnsode}}
4.

What is output by the following code?

System.out.println(""+3+4+5);

Asemmisa {{asɛmmisaAhyɛnsode}}
5.

What is the output by the code below?

System.out.println("Hello ");

System.out.print("people ");

System.out.println("everywhere ");

Asemmisa {{asɛmmisaAhyɛnsode}}
6.

What is output by the following code?

System.out.println(3+4+""+5*3);

Asemmisa {{asɛmmisaAhyɛnsode}}
7.

What is the output by the code below?

int num = 5;

System.out.println("num");

Asemmisa {{asɛmmisaAhyɛnsode}}
8.

What is the output by the code below?

System.out.println( "\"9" );

Asemmisa {{asɛmmisaAhyɛnsode}}
9.

What is the output by the code below?

char c = 65;

System.out.println(c);

Asemmisa {{asɛmmisaAhyɛnsode}}
10.

Which of the following lines correctly defines a char variable?

Asemmisa {{asɛmmisaAhyɛnsode}}
11.

Which of the following can be used to comment code in Java?

Asemmisa {{asɛmmisaAhyɛnsode}}
12.

Which of the following is the tab character?

Asemmisa {{asɛmmisaAhyɛnsode}}
13.

Which of the following lines correctly defines a String variable?

Asemmisa {{asɛmmisaAhyɛnsode}}
14.

What of the following is not a legal reserved word for a java data type?

Asemmisa {{asɛmmisaAhyɛnsode}}
15.

What is the output by the code below?

int cost = 2.65;

System.out.println("Price: " + cost);

Asemmisa {{asɛmmisaAhyɛnsode}}
16.

What is the output by the code below?

String s = "aplus";

System.out.println( s );

Asemmisa {{asɛmmisaAhyɛnsode}}
17.

In Java, every program statement ends with a what ?

Asemmisa {{asɛmmisaAhyɛnsode}}
18.

Every method must have an open and close what?

Asemmisa {{asɛmmisaAhyɛnsode}}
19.

What is the output by the code below?

System.out.print( "ap\\lus" );

Asemmisa {{asɛmmisaAhyɛnsode}}
20.

Which of the following is a 32 bit data type?