Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

help please

Thread view: 
maitreya - 05 Nov 2006 09:03 GMT
hello  im new to this group as im to java. i wanted to clarify this
situation ->

   we have a package called A and we have imported it in a class of
package C
   now,  will all the subclasses of all the classes of package A (may
they be in package A or in any other package) be available to the
   importing class of package C.

   also tell of a way to importing the if they dont get imported.
   
kindly respond
Thomas Schodt - 05 Nov 2006 09:48 GMT
> hello  im new to this group as im to java. i wanted to clarify this
> situation ->
[quoted text clipped - 6 lines]
>
>     also tell of a way to importing the if they dont get imported.

Java import does not affect if a class is available (*)
it is just a compile time convenience feature.

(*) a 3rd party library (jar) needs to be put in the classpath for the
classes it contains to be available.

You don't have to use import - you can write out the path explicitly in
your source code.

java.text.DecimalFormat fmt = new java.text.DecimalFormat("0.0");

When compiled, the bytecode this produces will be indistinguishable from
the bytecode produced for

import java.text.DecimalFormat;

DecimalFormat fmt = new DecimalFormat("0.0");
Simon Brooke - 05 Nov 2006 11:49 GMT
> hello  im new to this group as im to java. i wanted to clarify this
> situation ->
[quoted text clipped - 4 lines]
> they be in package A or in any other package) be available to the
>     importing class of package C.

No.

>     also tell of a way to importing the if they dont get imported.

Import them explicitly.

Signature

simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/

       ;; If you're doing this for fun, do what seems fun.  If you're
       ;; doing it for money, stop now.
                                                       ;; Rainer Deyke

maitreya - 05 Nov 2006 14:44 GMT
> > hello  im new to this group as im to java. i wanted to clarify this
> > situation ->
[quoted text clipped - 12 lines]
>
> --

thanks

> simon@jasmine.org.uk (Simon Brooke) http://www.jasmine.org.uk/~simon/
>
>         ;; If you're doing this for fun, do what seems fun.  If you're
>         ;; doing it for money, stop now.
>                                                         ;; Rainer Deyke

many thanks


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.