Can someone tell me how to fix this please?

public class NestedNumber
{
  public static void main(String[] args)
  {
    for (int i=1; i<=5; i++)
    {
      System.out.println();
      for (int j=1; j<=i; j++)
      {
        System.out.print(j);
      }
    }
  System.out.println();
 }
}

Make sure the name of your file is "NestedNumber.java".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.