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


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

Re: public <E> String FUNCTIONNAME( ?,?)

Received by 10.66.84.168 with SMTP id a8mr4732980paz.25.1349802953865; Tue, 09 Oct 2012 10:15:53 -0700 (PDT)
Received by 10.68.212.99 with SMTP id nj3mr5348631pbc.20.1349802953816; Tue, 09 Oct 2012 10:15:53 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!kt20no16593568pbb.1!news-out.google.com!g9ni23679pbh.1!nntp.google.com!kr7no11366557pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.programmer
Date Tue, 9 Oct 2012 10:15:53 -0700 (PDT)
In-Reply-To <k51bm5$etp$1@dont-email.me>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
NNTP-Posting-Host 69.28.149.29
References <6d2e79a9-7f37-4558-89b1-d451298b9890@googlegroups.com> <k51bm5$etp$1@dont-email.me>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <fea256a3-09a6-49ff-918d-67fe2482a207@googlegroups.com> (permalink)
Subject Re: public <E> String FUNCTIONNAME( ?,?)
From Lew <lewbloch@gmail.com>
Injection-Date Tue, 09 Oct 2012 17:15:53 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.lang.java.programmer:19205

Show key headers only | View raw


Jeff Higgins wrote:
> waiter.james1991@ wrote:
>> public<E>   String     FUNCTIONNAME(  ?,?) {
>>
>>          ......
>> }
>>
>
>> it's return type is<E>String  ???

No.

Got enough question marks there?

See
http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.4

"MethodHeader:
"  MethodModifiers[opt] TypeParameters[opt] Result MethodDeclarator Throws[opt] "

http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.4.4

"A method is /generic/ if it declares one or more type variables (§4.4).
"These type variables are known as the type parameters of the method. The form of the type parameter section of a generic method is identical to the type parameter section of a generic class (§8.1.2)."

etc.

> No. The return type would be String.
> The <E>, a "type parameter", simply introduces a name
> for a generic type into the scope of the method.
> You have apparently chosen to ignore it in your paraphrased example.
> 
>> what it's  [sic] exactly mean?
> 
> See:
> <http://docs.oracle.com/javase/tutorial/extra/generics/methods.html>
> and/or a generic web search using the terms java+generic+method.

-- 
Lew

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


Thread

public  <E>  String     FUNCTIONNAME(  ?,?) waiter.james1991@gmail.com - 2012-10-09 01:48 -0700
  Re: public  <E>  String     FUNCTIONNAME(  ?,?) Roedy Green <see_website@mindprod.com.invalid> - 2012-10-09 02:03 -0700
  Re: public  <E>  String     FUNCTIONNAME(  ?,?) Jeff Higgins <jeff@invalid.invalid> - 2012-10-09 10:23 -0400
    Re: public  <E>  String     FUNCTIONNAME(  ?,?) Lew <lewbloch@gmail.com> - 2012-10-09 10:15 -0700
      Re: public  <E>  String     FUNCTIONNAME(  ?,?) Jeff Higgins <jeff@invalid.invalid> - 2012-10-09 17:30 -0400
        Re: public  <E>  String     FUNCTIONNAME(  ?,?) Lew <lewbloch@gmail.com> - 2012-10-09 16:08 -0700
          [OT] The addendum and Meta [was]Re: public <E> String FUNCTIONNAME( ?,?) Jeff Higgins <jeff@invalid.invalid> - 2012-10-10 05:51 -0400
            An addendum Jeff Higgins <jeff@invalid.invalid> - 2012-10-10 06:04 -0400
  Re: public  <E>  String     FUNCTIONNAME(  ?,?) Eric Sosman <esosman@comcast-dot-net.invalid> - 2012-10-09 17:40 -0400
  Re: public  <E>  String     FUNCTIONNAME(  ?,?) Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-10-09 23:47 +0200
    Re: public  <E>  String     FUNCTIONNAME(  ?,?) Arne Vajhøj <arne@vajhoej.dk> - 2012-10-09 18:09 -0400
      Re: public  <E>  String     FUNCTIONNAME(  ?,?) Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-10-10 00:43 +0200

csiph-web