Not getting the problem in my code....need help plz | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Not getting the problem in my code....need help plz

kindly provide the solution https://code.sololearn.com/c4SkFT8434pp/?ref=app

11th May 2017, 2:22 PM
Dolu
Dolu - avatar
5 Answers
+ 14
The display method needs to be closed with a curly brace }
11th May 2017, 2:28 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 7
1.Forget Bracket 2.Unknown character which is invisible inside
11th May 2017, 3:35 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 5
You would better see this kind of mistake by better indenting/spacing your code: import java.util.Scanner; public class Program { public void display() { Scanner sc=new Scanner(System.in); int r; int n; System.out.println(" Enter a no."); n = sc.nextInt(); while (n!=0) { r=n%10; n=n/10; System.out.println(r); } } public static void main (String args[]) { Program obj =new Program(); obj.display(); } }
11th May 2017, 3:13 PM
visph
visph - avatar
+ 3
You forgot to close method display }
11th May 2017, 2:29 PM
Алексей Избродин
Алексей Избродин - avatar
+ 3
thanks a lot everyone☺
11th May 2017, 3:42 PM
Dolu
Dolu - avatar