Exception in thread error

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
System.out.println(“1”);
int i=2;
while(i<=n){
int j=1;
while(j<=i){
if(j==1 || j==i)
System.out.print(i-1);
else
System.out.print(“0”);
j++;

    }
    i++;
    System.out.println();
    
  }

}

}

Program is working fine in my case.
The Exception in thread “main” java.lang.NoClassDefFoundError is a common error in Java which occurs if a ClassLoader is not able to find a particular class in the classpath while trying to load it. The Exception in thread “main” suggests that this error has occurred in the main thread, the thread which is responsible for running Java application.java.lang.NoClassDefFoundError and comes when that particular class is present during compile time but somehow not available during runtime. This could be due to missing JAR file, any permission issue, or incorrect classpath on runtime, depending upon your environment.

Read more: http://www.java67.com/2012/08/what-is-noclassdeffounderror-in-java.html#ixzz5kO8GHroJ

Hey Ritu,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.