i have some code in the main class A and some in another class B. i compile class B with no problems, but if i try to compile the main class A, which has objects and methods referenced to the class B, i get allways an error. i think that i have set the path and classpath correctly and both files are in the same folder, why cannot find my main class A the objects created by class B which are also in the same folder? Also i have tried to put those files in a package, the problem occours again. Many thanks for every help and usefull tip
regards
------------------------------------------------------------
public class classA {
public static void main(String[] args) {
classB dosomething = new classB();
dosomething.setX(77);
}
}
------------------------------------------------------------public class classB {
private int xtest;
public void setX(int ab) {
xtest = ab;
}
public int getX() {
return xtest;
}
}
------------------------------------------------------------
regards
------------------------------------------------------------
public class classA {
public static void main(String[] args) {
classB dosomething = new classB();
dosomething.setX(77);
}
}
------------------------------------------------------------public class classB {
private int xtest;
public void setX(int ab) {
xtest = ab;
}
public int getX() {
return xtest;
}
}
------------------------------------------------------------