-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtestJavaCode.java
59 lines (52 loc) · 1.9 KB
/
testJavaCode.java
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
import Java.util.Scanner;
public class TestJavaCode.java
public static void main(String[] args){
int a = 8;
int b = 4;
int c = 0;
float d = 3.14;
float e = 6.85;
float f = 0.0;
String animal = "dog";
String statement = "is good!";
char letter1 = 'c';
char letter2 = 'a';
char letter3 = 't';
boolean working = true;
String entry;
boolean holdRetuurn;
System.out.println(a + "this is var a");
System.out.println(b + "this is var b");
System.out.println(c + "this is var c");
System.out.println(a + b + "this is a + b");
c = a + b;
System.out.println(c + "this is a + b saved in c");
c = a - b;
System.out.println(c + "this is a - b saved in c");
c = a * b;
System.out.println(c + "this is a * b saved in c");
c = a / b;
System.out.println(c + "this is a / b saved in c");
c = a * (a - b);
System.out.println(c + "this is a * (a - b) saved in c");
f = d + e;
System.out.println(f + "this is d + e saved in c");
f = d * e;
System.out.println(f + "this is d * e saved in c");
System.out.println(animal);
System.out.println(statement);
System.out.println("enter a string");
if(working == true){
System.out.println(animal + statement);
}
for(int i = 0; i < word.length(); i++){
Systerm.out.println(letter1 + letter2 + letter3)
}
if(holdRetuurn == true){
System.out.println("you have entered a string that contains letters that make up the word 'no' ");
}
else {
System.out.println("you have entered a string that does not contain all letters that make up the word 'no' ");
}
}
}