Re: Beginner question referring to an object in a class from within method in that class

Kristen Henry <klhnry-ghPzOgZAkNRWk0Htik3J/[email protected]> Fri, 28 Jul 2023 22:12:35 -0600
Newsgroups gmane.comp.lang.as400.java
Message-ID <CADy+iEmY5cN2nmo_gdEp0qKhmWS3K4keNOa_y=g0WfwjQxOrmw@mail.gmail.com>
Hi,

I suggest an online course for you.

https://www.codecademy.com/learn/learn-java

Best wishes!

Kristen

On Fri, Jul 28, 2023, 10:08 PM Peter Dow <[email protected]> wrote:

> James,
>
> Almost missed this!  Thanks once again; I'm learning a lot here.
>
> A constructor is not a method.  Does it work like a method, but is only
> invoked by using the "new" keyword? Can it have any parms? Like
>
> foo = new Bar(aParm); ?
>
>
> And classes don't always have to have a constructor, right?
>
>
> On 7/28/2023 4:50 PM, James H. H. Lampert via JAVA400-L wrote:
> >
> > (Oh, and a constructor is not a method; it's a constructor, sort of
> > the way the King is not a subject, he's the King. [Apologies to Ben
> > Jonson.] And methods don't have constructors; classes have them.)
> --
> This is the Java Programming on and around the IBM i (JAVA400-L) mailing
> list
> To post a message email: [email protected]
> To subscribe, unsubscribe, or change list options,
> visit: https://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
> Before posting, please take a moment to review the archives
> at https://archive.midrange.com/java400-l.
>
-- 
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/java400-l.