Can't understand error while submitting working fine on eclipse i

//error while submittingCompiling failed with exitcode 1, compiler output:
//Main.java:3: error: cannot find symbol
// public static void main(string args[]) {
// ^
// symbol: class string
// location: class Main
//1 error

import java.util.Scanner;

public class ganesh {

public static void main(String[] args) {Scanner scn=new Scanner(System.in);
	int n=scn.nextInt();
	scn.close();
	int row=1;
	while(row<=n)

	{
		if (row>1&&row<=n/2)
		{
			System.out.print("*");
			for(int csp=1;csp<(n/2);csp++)
			{
				System.out.print(" ");
			
			}
			System.out.print("*");
		}
		else if(row==1)
		{
			System.out.print("*");
			for(int csp=1;csp<(n/2);csp++)
			{
				System.out.print(" ");
			
			}
			for(int cst=1;cst<n/2+2;cst++)
			{
				System.out.print("*");
			}
			
		}
		else if(row==n/2+1)
		{
			for(int cst=1;cst<=n;cst++)
			{
				System.out.print("*");
		
			}
		}
		else if(row==n)
		{
			for(int cst=1;cst<n/2+2;cst++)
			{
				System.out.print("*");
			}
			for(int csp=1;csp<(n/2);csp++)
			{
				System.out.print(" ");
			
			}
			
			System.out.print("*");
		}
		else
		{
			for(int cspp=1;cspp<=n/2;cspp++)
			{
				System.out.print(" ");
			}
			System.out.print("*");
			for(int csp=1;csp<(n/2);csp++)
			{
				System.out.print(" ");
			
			}
			System.out.print("*");
			}
		System.out.println("");
		row=row+1;
		}

}
}

Hey naman, just delete the line scn.close() and then try submitting your answer.

It shows same error again.Nothing change by deleting scn.close()

It doesn’t show any error for me.
Make sure s of String in public static void main(String[] args) is capital.

Exactly mam it’s running fine on eclipse facing error on submitting and running on hacker blocks.It’s already capital mam.

Hey Nishant, your code is working fine on hackerblocks also, try to submit it once again.