1 n == 4
 2 n != 4
 3 true
 4 !b
 5 true
 6 false 
 7 false
 8 true
 9 b
10 if (n < 10) 
     b = (n > 5)
   else if (true) 
          b = false; 
        else 
          b = (n < 20); 
// note: this is not what I originally intended 
// however, as is, it's perfectly acceptable
11 b = (n > 5) && (b < 10); // so true when n is just 6, 7, 8, 9 otherwise false
// see code at the bottom for testing 
12 -4
13 2
14 7
15 1
16 0
17 4
18 2
19 7
20 2
21 'e'
22 true 
23 2
24 '5'
25 false 
26 false 
27 false 
28 false 
29 false 
30 see https://www.cs.indiana.edu/classes/c212-dgerman/fall2017/0906.html
31 20
32 7
33 20
34 infinite loop
35 no, the first turns 8 into 11 and everything else into 5
meanwhile the second turns 8 into 11 and then into 5, and everything else in 5
so they differ in just one point, but they differ: in how they handle 8 (so they're not equivalent)
36 none (zero instance variables) 
37 m and q (so: two) 
38 no constructors (which means the class has one constructor, the no arg default constructor, in this case)
39 int count = 0; 
   System.out.println( ++ count ); 
   while (Math.random() < 0.5) {
     System.out.println( ++count ); 
   }
30 y is unchanged (whatever value it had before, even though we don't know it, it still has the same value at the end)
41 false 
42 true 
43 infinite sequence of 0 (zero)'s because the loop is infinite (count = count + 1 is not in the body of the loop)
44 0 1 2 3 4 5 6 7 8 9 one number per line 

public class Ten {
  public static void main(String[] args) {
    boolean b = false; 
    for (int n = -10; n < 40; n++) {
      b = (n < 10) ? (n > 5) : true ? false : (n < 20);
      System.out.println( n + ": " + b );
    }
  }
}

Welcome to DrJava.  Working directory is C:\Users\cogli\Desktop
> run Ten
-10: false
-9: false
-8: false
-7: false
-6: false
-5: false
-4: false
-3: false
-2: false
-1: false
0: false
1: false
2: false
3: false
4: false
5: false
6: true
7: true
8: true
9: true
10: false
11: false
12: false
13: false
14: false
15: false
16: false
17: false
18: false
19: false
20: false
21: false
22: false
23: false
24: false
25: false
26: false
27: false
28: false
29: false
30: false
31: false
32: false
33: false
34: false
35: false
36: false
37: false
38: false
39: false