import java.io.*;
public class locc1
{
int a;
public void get()
{
System.out.println(a);
}
}
class locsam1
{
public static void main(String args[])
{
locc1 l=new locc1();
l.a=98;
l.get();
}
}
hai guys .. upon execution of this program it shows me an error as " class locc1 is public, should be declared in a file named locc1.java .. why do error occurs .? and i want to know the solution to get rid of this error and also i want the reason why this error is raised . please guys help me.. thanks in advance .

