/* Some expressions to type into BlueJ's code pad. * These are to contrast with some of the expresssions * in scheme (lect02a.ss). */ double y = 7; double x = (y > 3) ? 4 : 5 ; x // 4.0 (double) 17 * ((y > 3) ? 4 : 5) // 68 (int) 2 + y > 3 ? 4 : 5 + 4 // 4 (int) (2 + y > 3) ? 4 : ( 5 + 4) // 4 (int) 2 + (y > 3 ? 4 : 5) + 4 // 10 (int) 4 + 5 * 6 // 34 (int) Integer.toString( 5 ) // "5" (String) Integer.toString( 54 ) // "54" (String) Integer.parseInt( "234" ) // 234 (int) String greeting = "hello"; greeting.toUpperCase() // "HELLO" (String) greeting // "hello" (String) "hello".toUpperCase() // "HELLO" (String)