Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to call a method in different package?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I overload to string method

1449


Explain OOPs concept.

1095


What is the purpose of default constructor?

1004


Is {a, n, d} a palindrome? If you are given a random string, is it a palindrome or not?

1136


What is the Scope of Static Variable?

1236


What is constructor and its types?

1158


Explain when we should make an instance variable private.

1133


What is quick sort in java?

1023


What is import java util arraylist?

1188


Can two objects have same hashcode?

1006


Is 0 a real number?

1053


what are the methods in object?

1155


Differentiate between class and structure.

1137


What is the difference between stringbuffer and stringbuilder?

1065


Which java version is latest?

1041