how to call a method in different package?
Answers were Sorted based on User's Feedback
Answer / sandhya.s
Import the package in to the class, where other package's
method is useful.
Is This Answer Correct ? | 18 Yes | 4 No |
Answer / venkatachalapathy
import fully Qualified name of the package in which the
method is present
use the method as "classname.methodname"
or
create the object of that package using a fullyqualifed
name of that package and use the method
as "object.methodname
Is This Answer Correct ? | 12 Yes | 0 No |
Answer / 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 |
Answer / taresh nama
You Must import the package with fully Qualified name of
the class contains method.
Now you can call a method as:classname.method();
You can create a new object to that class and then call the
method as objectname.method();
Is This Answer Correct ? | 3 Yes | 5 No |
what are the oops concept in java explain with real time examples
24 Answers Accenture, Bosch, Consummate Technologies, CTS, Current Technologies, iNautix, Infosys, Kekran Mekran, QA InfoTech, RTRT, SofTech, Tech Mahindra, Thorogood, Timios, Wipro,
What is the primitive type byte?
What is Java Reflection API? Why it’s so important to have?
what is diff bet iterator and enumeration?
How many times garbage collector will invoke an object?s finalize() method?
Why set do not allow duplicates in java?
While opening the file, what type of exceptions can be caught?
Is java owned by oracle?
Explain some best practices you would apply while using collection in java?
difference between arraylist and linkedlist otherthan performance
why did you choose your career in IT?
What is argument in java?