-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathteaching.java
More file actions
61 lines (48 loc) · 1.28 KB
/
teaching.java
File metadata and controls
61 lines (48 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
public class Main {
/**
* Learning program created to quickly teach little FireHawks how to code Java
* @param args
*/
public static void main(String[] args) {
int integer1 = 12;
ExampleClass object = new ExampleClass(99);
System.out.println(object.integer1);
// System.out.println(object.integer2);
object.integer1 = 39;
System.out.println(object.integer1);
// object.integer2 = 39;
// System.out.println(object.integer2);
object.setInt2(671);
// System.out.println(object.integer2);
State myState = State.A;
System.out.println(myState);
System.out.println(State.A);
}
}
public class ExampleClass {
public int integer1 = 2;
private int integer2;
public double decimal = integer1 + 0.6682;
// double decimal2 = integer2 + 0.6682;
// if (decimal == 13) {
// System.out.println("It's true!");
// }
// integer2 = 17;
public ExampleClass(int value) {
if (decimal == 13) {
System.out.println("It's true!");
}
integer2 = value;
}
public void setInt2(int value) {
integer2 = value;
}
private int example() {
return 6;
}
}
public enum State {
A,
B,
C
}