How to call a Java class from another java class ??
Hi ..... can somebody plz tell me
How to call a Java Class from another Java Class assuming both in the same Package??
I want to call the entire Java Class (not any specific method only........I want all the functionalities of that class)
Please provide me some slotuions!!
Waiting for some fast replies!!
snehal kendre replied
you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
you have developed A.java and B.java, both are in same package.
in implementaion of B.java
A obj = new A();
//to access A's methods
// to access A's variable
A.setvariable() or A.getvariable()