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


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

Re: how does one explain this syntax?

Newsgroups comp.lang.java.programmer
Date 2016-05-23 14:36 -0700
References <nhrhd5$7r6$1@reader1.panix.com> <nhs4gm$lre$1@dont-email.me> <nht4d5$kuu$2@reader1.panix.com>
Message-ID <122ea33e-1e42-4dc0-8e37-b01b778ee306@googlegroups.com> (permalink)
Subject Re: how does one explain this syntax?
From Lew <lewbloch@gmail.com>

Show all headers | View raw


On Sunday, May 22, 2016 at 1:22:07 PM UTC-7, Popping mad wrote:
> On Sun, 22 May 2016 07:21:15 -0400, Eric Sosman wrote:
> 
> >        /* Display content using Iterator*/
> >>       Set set = tmap.entrySet(); <<random obscure syntax... that is a
> >> constructor for another class?
> > 
> >      It's a method call.
> 
> evidently it is a constructor

No, it is not a constructor. 'entrySet()' is a standard method of the 'java.util.Map' interface, with which *all* Java programmers should be familiar. I suggest the Tutorials for you as well, Popping mad.

> the question because why do I need two levels of class hierarchy manually 
> called just to do a simple foreach.

You have to obtain the collection through which you wish to iterate.

-- 
Lew

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


Thread

how does one explain this syntax? ruben safir <ruben@mrbrklyn.com> - 2016-05-22 01:51 -0400
  Re: how does one explain this syntax? Martin Gregorie <martin@address-in-sig.invalid> - 2016-05-22 10:05 +0000
  Re: how does one explain this syntax? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-22 07:21 -0400
    Re: how does one explain this syntax? Popping mad <rainbow@colition.gov> - 2016-05-22 20:21 +0000
      Re: how does one explain this syntax? Lars Enderin <lars.enderin@telia.com> - 2016-05-22 22:32 +0200
      Re: how does one explain this syntax? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-22 17:32 -0400
      Re: how does one explain this syntax? Lew <lewbloch@gmail.com> - 2016-05-23 14:36 -0700
    Re: how does one explain this syntax? Lew <lewbloch@gmail.com> - 2016-05-23 14:34 -0700
  Re: how does one explain this syntax? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-05-22 08:41 -0700
    Re: how does one explain this syntax? Robert Klemme <shortcutter@googlemail.com> - 2016-05-22 22:22 +0200
      Re: how does one explain this syntax? Knute Johnson <nospam@rabbitbrush.frazmtn.com> - 2016-05-22 22:13 -0700
        Re: how does one explain this syntax? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-23 07:32 -0400
          Re: how does one explain this syntax? Robert Klemme <shortcutter@googlemail.com> - 2016-05-23 04:57 -0700
  Re: how does one explain this syntax? Popping mad <rainbow@colition.gov> - 2016-05-22 20:23 +0000
  Re: how does one explain this syntax? Roedy Green <inquiry@mindprod.com> - 2016-05-30 21:51 -0700
  Re: how does one explain this syntax? Roedy Green <inquiry@mindprod.com> - 2016-05-30 21:54 -0700
  Re: how does one explain this syntax? Roedy Green <inquiry@mindprod.com> - 2016-05-30 22:00 -0700
  Re: how does one explain this syntax? Roedy Green <inquiry@mindprod.com> - 2016-05-30 22:17 -0700

csiph-web