Kapitel 2 Flashcards
1
Q
1
A
// A crazy mixed up program public class Columbus { public static void main(String[] args) { System.out.println("In 1492 Columbus sailed the ocean blue."); } }
2
Q
2
A
Columbus.java
3
Q
3
A
public class Hello { public static void main(String[] args) { System.out.println("Hello World"); } }
4
Q
4
A
// Example // August 22, 2013 public class MyName { public static void main(String[] args) { System.out.println("Herbert Dorfmann"); } }
5
Q
5
A
C
6
Q
6
A
A
7
Q
7
A
// Its a mad, mad program public class Success { public static void main(String[] args) { System.out.print("Success\n"); System.out.print("Success "); System.out.print("Success\n"); System.out.println("\nSuccess"); } }
8
Q
8
A
The works of Wolfgang include the following
The Turkish March and Symphony No. 40 in G minor.
9
Q
9
A
// August 22, 2013 public class PersonalInfo { public static void main(String[] args) { System.out.println("Herbert Dorfmann"); System.out.println("123 Elm Street"); System.out.println("My Town, NC 21111"); System.out.println("919-555-1234"); } }
10
Q
10
A
Variables: little big Literals: 2 2000 "The little number is " "The big number is "
11
Q
11
A
The value is number
12
Q
12
A
99bottles is illegal because it starts with a number.
r&d is illegal because the & character is illegal.
13
Q
13
A
They are not the same because one begins with an uppercase S while the other
begins with a lowercase s. Variable names are case-sensitive.
14
Q
14
A
a) short
b) int
c) 22.1 because it is stored as a double .
15
Q
15
A
6.31E17