0

Why showing error in this program. Error showing in last else condition

Package mysecondapp; Import java. util. Scanner ; Public class mysecondapp { Public static void main (string [] args) { int x, y, z; Scanner in=new Scanner (System. in) ; System. out. println ("enter the number") ; x=in. nextInt() ; y=in. nextInt () ; z=in. nextInt () ; If (x>y&&x>z) System. out. println("first number is large) ; else if (y>x&&y>z) System. out.println ("second number is large) ; else if (z>x&&z>y) System. out. println ("third number is large) ; else System.out.println ("no result ") ;

19th Jan 2017, 4:12 PM
Dheerendra Kumar
Dheerendra Kumar - avatar
2 odpowiedzi
+ 5
Is this the actual code?
19th Jan 2017, 4:19 PM
Saumya
Saumya - avatar
+ 2
You missed a " in the print parameters If (x>y&&x>z) System. out. println("first number is large) ; <--- else if (y>x&&y>z) System. out.println ("second number is large) ; <--- else if (z>x&&z>y) System. out. println ("third number is large) ; <---
19th Jan 2017, 4:22 PM
Andreas K
Andreas K - avatar