Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9114

Re: Question regarding methods and classes

Newsgroups comp.lang.java.programmer
From Linus Flustillbe <admin@nacs.dyndns-office.com>
Subject Re: Question regarding methods and classes
References <4ea389df$0$13444$9a566e8b@news.aliant.net> <2fk7a71akc2k7fr1ennkiql4um7sbnbp2h@4ax.com>
Date 2011-10-23 13:49 +0000
Message-ID <4ea41b5f$0$19700$9a566e8b@news.aliant.net> (permalink)

Show all headers | View raw


On 2011-10-23, Roedy Green <see_website@mindprod.com.invalid> wrote:
> On 23 Oct 2011 03:28:31 GMT, Linus Flustillbe
><admin@nacs.dyndns-office.com> wrote, quoted or indirectly quoted
> someone who said :
>
>>Does a method have to be part of a class that gets instatiated or can it
>>live in a class to be available to all other classes without
>>instantiation...it's available when it's imported?
>
> You can have static methods that can be called without creating any
> objects.  The class itself will get loaded and an invisible class
> object will be created with slots for all the static variables.
>
> This is a very basic feature of Java.  I suggest you get an text, even
> a badly out of date one, to explain such things.
> see http://mindprod.com/jgloss/gettingstarted.html

Thanks Roedy.  I was just getting ahead of myself; thinking about "what
if" when I was still on the "what" topic.  As you can see from other
reponses to my question and my replies, I have figured it out for the
most part but still don't understand why I have to modify the import
statement... someone will probably say "that's just the way it has to
be" and if that's the case, that's fine.


-- 
****************************************************************
* Usenet Impovement Project http://nacs.dyndns-office.com/usenet
****************************************************************

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 03:28 +0000
  Re: Question regarding methods and classes Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-10-22 20:44 -0700
    Re: Question regarding methods and classes Patricia Shanahan <pats@acm.org> - 2011-10-23 06:14 +0100
  Re: Question regarding methods and classes markspace <-@.> - 2011-10-22 22:12 -0700
    Re: Question regarding methods and classes markspace <-@.> - 2011-10-22 22:14 -0700
      Re: Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 13:32 +0000
        Re: Question regarding methods and classes markspace <-@.> - 2011-10-23 07:43 -0700
        Re: Question regarding methods and classes Lew <lewbloch@gmail.com> - 2011-10-23 08:54 -0700
  Re: Question regarding methods and classes Roedy Green <see_website@mindprod.com.invalid> - 2011-10-23 01:37 -0700
    Re: Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 13:49 +0000
      Re: Question regarding methods and classes Roedy Green <see_website@mindprod.com.invalid> - 2011-11-02 01:23 -0700
  Re: Question regarding methods and classes Linus Flustillbe <admin@nacs.dyndns-office.com> - 2011-10-23 09:11 +0000

csiph-web