Course:: The Quiz Questions
Course:: The Quiz Questions
1. The elements of the “Hello World” got mixed up. Put them in the right order.
System.out.println("Hello World!");
package helloworld;
}
}
a) long
b) int
c) double
d) integer
e) float
f) real
g) word
h) longint
i) int64
j) bool
k) byte
a) int a = 6;
b) a: int;
c) int a;
d) int a: 6;
e) int a; a = 6;
f) a: 6 = int;
g) a = 6: int;
h) a = 6;
2 sc.nextLine() b double
3 sc.next() c int
4 sc.nextDouble() d float
The answers
1. The elements of the “Hello World” got mixed up. The numbers in front of the
lines show their right order.
4 System.out.println("Hello World!");
1 package helloworld;
5 }
}
package helloworld;
public class Helloworld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
a) long
b) int
c) double
d) integer
e) float
f) real
g) word
h) longint
i) int64
j) bool
k) byte
a) int a = 6;
b) a: int;
c) int a;
d) int a: 6;
e) int a; a = 6;
f) a: 6 = int;
g) a = 6: int;
h) a = 6;
1 sc.nextInt() c int
4 sc.nextDouble() b double
5 sc.nextFloat() d float
1 = c Assignment to a variable
1 a == b b !(a != b)