Import Java. util. role; Class test4 {public static void main (string [] ARGs) {S = new role (system. in); system. out. println ("height:"); system. out. println ("Fortune:"); system. out. println ("handsome no:"); int Height = S. nextint (); double money = S. nextdouble (); string STR = S. next (); Boolean M = Str. equals ("yes"); // enter the value of "handsome" and Str. equals ("yes") parameter "yes" for comparison, the same, returns true (true) if (height> = 180 & money> = 10.0 & M = true) {system. out. printl N ("I must marry you! ");} Else if (height> = 180 | money> = 10.0 | M = true) {system. Out. println (" Marry, not more than, more. ");} Else system. Out. println (" will not marry you! ");}}
This article is from the "First day of course" blog, please be sure to keep this source http://5453607.blog.51cto.com/5443607/1529856