Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
How to call class from different package?
Syskata Mitev
Ranch Hand
Posts: 51
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i have two packages: Main and Users, so i wont from package Users to call package Main class Begin. Please sorry for my stupid question but i am beginer in the
java
flexibility.
Deroga Rivera
Greenhorn
Posts: 13
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You could either import the other package or fully qualify your call.
so import user.begin.* and you can get to all your public methods
Srinivas Kalvala
Ranch Hand
Posts: 257
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello,
Use import statements, make sure that the class is public.
Remeber a Clas Can be : Public or Defualt Package access.
If Default it can be accessed only with in same package.
If public you can access out side of package provided that the class is imported.
Campbell Ritchie
Marshal
Posts: 79177
377
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Posted by Srinivas Kalvala
Remeber a Clas Can be : Public or Defualt Package access.
You can also have private or protected class access.
Syskata Mitev
Ranch Hand
Posts: 51
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks a lot java family.
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
execute JAR from class
A BIG Question Concerning Packages
Class not found in Package
what happen if we call another method within the transaction block
Using class of the package in other classes in the package?
More...