class A { public static void main(String[] args) { System.setProperty("java.class.path","E:\\javadem\\"); System.out.println("prop: "+System.getProperty("java.class.path")); B obj=new B(); System.out.println("Class A from C directory"); obj.display(); } }
class B { public void display() { System.out.println("B class!!!"); } public static void main(String[] args) { System.out.println("This is class B fom E directory"); } }
A.java:18: error: cannot find symbol B obj=new B(); ^ symbol: class B location: class A
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)