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 predicate in java?

556


Explain how to force the garbage collection in java.

528


Explain 5 features introduced in jdk 1.7?

606


What modifiers may be used with a top-level class?

571


How many bytes is a char in java?

523






What do you mean by aggregation?

561


What is the file type?

551


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

753


What is abstract class constructor called?

563


What is == and === in javascript?

553


What are variable names?

524


What is string pooling concept?

548


what is the swingutilities.invokelater(runnable) method for? : Java thread

544


How do you replace all in word?

518


Is java hashset ordered?

575