There are two .java files . I want to create an object of one class(which is in one .java file ) in the other class (which is in another .java file).
How to go about it?
ex:
//file Class1.java
public class Class1{
public static void main(
String[] args)
{
}
}
//file Class2.java
public class Class2{
public static void main(String[] args)
{
Class1 obj=new Class1();
}
}
But it is giving a compile error?
Please help me .
Thanx in advance.