how to call a method in different package?

Answer Posted / kiranksj

import package in the class.That package related methods are now accessible in a class.If u want call a method
classname.method(); or create a new object to a class and then call the method like objectname.method();

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between double and float variables in java?

609


What is null in java?

497


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

1777


What is the difference between jfc & wfc?

571


How many types of gc are there in java?

535






Describe the syntax of multiple inheritance? When do we use such an inheritance?

557


What is google full form?

516


Is age discrete or continuous?

659


What is use of a abstract variable?

520


Explain java coding standards for variables ?

639


What is the purpose of using the java bean?

545


Can you explain the private protected field modifier?

548


What do you mean by global variable?

508


Explain about static imports in java?

574


What is used of static keyword in java?

561