Very easy program if u want to do then just see and try in any editor:This is simple sub packages program
For it first we have to create package and form that package we can derive another sub package OK......
here is package program:
package pack;
public class A1
{
public void msg()
{
System.out.println("enjoy guys");
}
}
here is sub package program
import pack.A1;
class B1
{
public static void main(String args[])
{
A1 obj = new A1();
obj.msg();
}
}
No comments