// SolutionToExercise_6_3.java Copyright (c) 2006 Kari Laitinen // http://www.naturalprogramming.com // 2006-02-12 File created. // 2006-02-12 Last modification. /* This is a multiline comment. Execute this program to see the following solution: D:\javasolutions>java SolutionToExercise_6_3 ( first_variable < second_variable ) is true ( third_variable < first_variable ) is false ( ! ( first_variable < second_variable ) ) is false ( third_variable > first_variable ) is true ( ( first_variable + second_variable ) < third_variable ) is true ( ( first_variable + second_variable ) <= third_variable ) is true ( ( third_variable - second_variable ) > first_variable ) is true ( first_variable == 0 ) is false ( ! ( first_variable == 0 ) ) is true ( first_variable > 0 || second_variable < 0 ) is true ( first_variable == 8 || second_variable == 5 ) is false ( first_variable < second_variable && third_variable >= 14 ) is true ( first_variable == 5 && second_variable > 8 ) is false This is the last line of the multiline comment *****/ import java.util.* ; class SolutionToExercise_6_3 { public static void main( String[] not_in_use ) { Scanner keyboard = new Scanner( System.in ) ; int first_variable = 5 ; int second_variable = 8 ; int third_variable = 14 ; System.out.print( "\n ( first_variable < second_variable ) is " + ( first_variable < second_variable ) ) ; System.out.print( "\n ( third_variable < first_variable ) is " + ( third_variable < first_variable ) ) ; System.out.print( "\n ( ! ( first_variable < second_variable ) ) is " + ( ! ( first_variable < second_variable ) ) ) ; System.out.print( "\n ( third_variable > first_variable ) is " + ( third_variable > first_variable ) ) ; System.out.print( "\n ( ( first_variable + second_variable ) < third_variable ) is " + ( ( first_variable + second_variable ) < third_variable ) ) ; System.out.print( "\n ( ( first_variable + second_variable ) <= third_variable ) is " + ( ( first_variable + second_variable ) <= third_variable ) ) ; System.out.print( "\n ( ( third_variable - second_variable ) > first_variable ) is " + ( ( third_variable - second_variable ) > first_variable ) ) ; System.out.print( "\n ( first_variable == 0 ) is " + ( first_variable == 0 ) ) ; System.out.print( "\n ( ! ( first_variable == 0 ) ) is " + ( ! ( first_variable == 0 ) ) ) ; System.out.print( "\n ( first_variable > 0 || second_variable < 0 ) is " + ( first_variable > 0 || second_variable < 0 ) ) ; System.out.print( "\n ( first_variable == 8 || second_variable == 5 ) is " + ( first_variable == 8 || second_variable == 5 ) ) ; System.out.print( "\n ( first_variable < second_variable && third_variable >= 14 ) is " + ( first_variable < second_variable && third_variable >= 14 ) ) ; System.out.print( "\n ( first_variable == 5 && second_variable > 8 ) is " + ( first_variable == 5 && second_variable > 8 ) ) ; } }