in this we call static member of one package into another package.
make 2 packages create classes in one package and calls all these classes in another package.
for this first you must have the knowledge of building package.click here.
Example 1;-create 2 package name p1 and p2.
in p1 create two classes A and B like this.
now we call package p1 classes in package p2
first way:-
second way.:-by using import
* means it imports all the member of p1 package.
make 2 packages create classes in one package and calls all these classes in another package.
for this first you must have the knowledge of building package.click here.
Example 1;-create 2 package name p1 and p2.
in p1 create two classes A and B like this.
now we call package p1 classes in package p2
first way:-
second way.:-by using import
* means it imports all the member of p1 package.
No comments :
Post a Comment