first of all heres the code
// first file//
public class bottom
{
public static void main(String args[])
{
top obj=new top();
obj.display();
}
}
//second file//
public class top
{
public void display()
{
System.out.println("finaly i got the answer !");
}
}
both are saved in the same folder and i have double checked that the file name are same as that of class name.
now whenever i try to compile bottom i get the following error
bottom.java:7: cannot find symbol
symbol : class top
location: class bottom
top obj=new top();
^
bottom.java:7: cannot find symbol
symbol : class top
location: class bottom
top obj=new top();
^
2 errors
line numbers are not same, but anyways you would get it.
i dont know why it isn't able to detect top in the same folder.
please help