I had the following code in two different files. Op1.java compiles, but not Op.java. It says "cannot resolve symbol Op1". Both sources are in the same directory.
By the way, I'm forced to use the following command to run the
Java program in my laptop: (Thought this would give some clue about my settings)
java -classpath %classpath%;. hello1
I appreciate any help,
Thank you.
venkata
-------------------------------------------------
Op1.java
-------------------------------------------------
public class Op1
{
int i;
public void prnt()
{
{
System.out.println("Value of i within subset is : " + i);
i++;
System.out.println("Value of i within subset is : " + i);
}
}
}
-------------------------------------------------
Op.java
-------------------------------------------------
public class Op
{
public static void main(
String[] args)
{
Op1 O = new Op1();
O.prnt();
}
}
-------------------------------------------------