ExpressionsThing.java
1    package expressions;
2    
3    import npw.BlueDot;
4    
5    import javax.swing.*;
6    
7    public class ExpressionsThing {
8    
9    
10       public static void main(String[] args) {
11   
12           double one = 3.14 * 5 + 5; // this one does not work
13           System.out.println("one = " + one);
14           double two = 3.14 * (5 + 5);
15           System.out.println("two = " + two);
16           double three = (3.14 * (5 + 5)); // this one is fully parenthesized
17           System.out.println("three = " + three);
18           int four = (2 + 3);
19           System.out.println("four = " + four);
20           double five = ( 55 * 1/2 );
21           System.out.println("five = " + five);
22           double six = ( 65 * 1/3 );
23           System.out.println("six = " + six);
24           double seven = ((( 55 * 1/2 ) + ( 65 * 1/3 )));
25           System.out.println("seven = " + seven);
26           double eight = (3.14 * (11.3 * 11.3));
27           System.out.println("eight = " + eight);
28           double nine = (27.7 * 27.7);
29           System.out.println("nine = " + nine);
30          // double ten = ();
31           double eleven = (0.17 * 243.5);
32           System.out.println("eleven = " + eleven);
33           int twelve = (3 / 3);
34           System.out.println("twelve = " + twelve);
35           int thirteen = ((4 * 2) - 7);
36           System.out.println("thirteen = " + thirteen);
37           int fourteen = ((9 + 7) / (3 + 1));
38           System.out.println("fourteen = " + fourteen);
39           int fifteen = (((8 - 6) + (2 * 4)) / 2);
40           System.out.println("fifteen = " + fifteen);
41   
42   
43   
44   
45   
46   
47           SwingUtilities.invokeLater(new Runnable() {
48               public void run() {
49                   new ExpressionsThing();
50               }
51   
52           });
53       }
54   
55   }
56