Java Programing error in cmd -
import ppp.*; public class main{ public static void main(string args[]){ pp obj=new pp(); obj.show(); } }
this simple program gives error :
cannot access pp ppp(package) contains class file (pp.class) , it's on desktop main.java on desktop.
you have right package pp;
in class pp
here revised code
package ppp; public class pp { public static void main(string...a) { system.out.println("hello"); } public void show() { system.out.println("hello"); } }
and here main class
import ppp.*; public class main{ public static void main(string args[]){ pp obj=new pp(); obj.show(); } }
it you
Comments
Post a Comment