Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > public <E> String FUNCTIONNAME( ?,?)

Reply
Thread Tools

public <E> String FUNCTIONNAME( ?,?)

 
 
waiter.james1991@gmail.com
Guest
Posts: n/a
 
      10-09-2012
public <E> String FUNCTIONNAME( ?,?) {

......
}


it's return type is <E>String ???
what it's exactly mean?
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-09-2012
On Tue, 9 Oct 2012 01:48:48 -0700 (PDT), http://www.velocityreviews.com/forums/(E-Mail Removed)
wrote, quoted or indirectly quoted someone who said :

>public <E> String FUNCTIONNAME( ?,?) {
>
> ......
>}
>
>
>it's return type is <E>String ???


Method names are lower case

The return type is String. To understand what the <E> means see
http://mindprod.com/jgloss/generics.html
--
Roedy Green Canadian Mind Products http://mindprod.com
The iPhone 5 is a low end Rolex.


 
Reply With Quote
 
 
 
 
Jeff Higgins
Guest
Posts: n/a
 
      10-09-2012
On 10/09/2012 04:48 AM, (E-Mail Removed) wrote:
> public<E> String FUNCTIONNAME( ?,?) {
>
> ......
> }
>
>
> it's return type is<E>String ???

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 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.


 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      10-09-2012
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/...8.html#jls-8.4

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

http://docs.oracle.com/javase/specs/...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
 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      10-09-2012
On 10/09/2012 01:15 PM, Lew wrote:
> 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/...8.html#jls-8.4
>
> "MethodHeader:
> " MethodModifiers[opt] TypeParameters[opt] Result MethodDeclarator Throws[opt]"
>
> http://docs.oracle.com/javase/specs/...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.


It's curious that you reply to my reply to the original post
and then leave my comments uncommented upon. It seems somewhat
akin to top posting. I admit to having committed the same
on occasion, but you do it with some regularity and I thought
to comment on this occasion. Perhaps your newsreader makes it
difficult to negotiate the hierarchy of the thread and you
simply reply to the last post read.

>
>> 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.

>


 
Reply With Quote
 
Eric Sosman
Guest
Posts: n/a
 
      10-09-2012
On 10/9/2012 4:48 AM, (E-Mail Removed) wrote:
> public <E> String FUNCTIONNAME( ?,?) {
>
> ......
> }
>
>
> it's return type is <E>String ???
> what it's exactly mean?


Perhaps I'm missing something (it happens), but I don't
think it means anything at all. That is, I cannot think of
a way to fill in the elided bits to arrive at compilable code.

Could you show the actual code in which you found this,
with enough surrounding context to give slow plodders like
me a running start?

--
Eric Sosman
(E-Mail Removed)d
 
Reply With Quote
 
Daniele Futtorovic
Guest
Posts: n/a
 
      10-09-2012
On 09/10/2012 10:48, (E-Mail Removed) allegedly wrote:
> public <E> String FUNCTIONNAME( ?,?) {
>
> ......
> }
>
>
> it's return type is <E>String ???
> what it's exactly mean?


RTFM.

--
DF.
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      10-09-2012
On 10/9/2012 5:47 PM, Daniele Futtorovic wrote:
> On 09/10/2012 10:48, (E-Mail Removed) allegedly wrote:
>> public <E> String FUNCTIONNAME( ?,?) {
>>
>> ......
>> }
>>
>>
>> it's return type is <E>String ???
>> what it's exactly mean?

>
> RTFM.


Since the manuals index will not have a snippet like the
quoted code, then it will be reading from first page to
last page for those not knowing that the keyword is "generics".

Arne


 
Reply With Quote
 
Daniele Futtorovic
Guest
Posts: n/a
 
      10-09-2012
On 10/10/2012 00:09, Arne Vajhøj allegedly wrote:
> On 10/9/2012 5:47 PM, Daniele Futtorovic wrote:
>> On 09/10/2012 10:48, (E-Mail Removed) allegedly wrote:
>>> public <E> String FUNCTIONNAME( ?,?) {
>>>
>>> ......
>>> }
>>>
>>>
>>> it's return type is <E>String ???
>>> what it's exactly mean?

>>
>> RTFM.

>
> Since the manuals index will not have a snippet like the
> quoted code, then it will be reading from first page to
> last page for those not knowing that the keyword is "generics".


It's a fair cop.

<http://docs.oracle.com/javase/tutorial/java/generics/methods.html>

--
DF.
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      10-09-2012
Jeff Higgins wrote:
> It's curious that you reply to my reply to the original post
> and then leave my comments uncommented upon. It seems somewhat
> akin to top posting. I admit to having committed the same
> on occasion, but you do it with some regularity and I thought
> to comment on this occasion. Perhaps your newsreader makes it
> difficult to negotiate the hierarchy of the thread and you
> simply reply to the last post read.


I insert my comments inline where I have further remarks, but I keep
yours where they were, as with other cited material, to establish context
and to endorse the content, as useful at least and, in your case, as correct.

If I put my remarks under yours, then it looks as though I'm reacting to that
remark, when my point is usually marginal to an earlier line by a different
poster.

If I remove your remarks, then I lose the context that I deem important to cite.

I often find myself responding to threads where the main question has already
been answered better than I could have, but I see dangling threads. For example,
this is hypothetical, say I see an idiom for a 'final' instance method in a concurrent
context, and I see that 'final' might server better. I'll comment on that, and leave
your remarks in place in order not to lose the real answer.

And I'm using a web interface to Usenet which is a pain in the ass. It breaks lines
arbitrarily and doubles the lines, so a quoted line is

> this is a broken
>
> line through the
>
> f- friendly interface.


I have to demangle a lot to post. It's a testament to how important I think my
comments are that I am willing to go through all this effort to share them.

You're welcome.

(That was a joke, BTW.)

For various reasons unrelated to product quality it's inconvenient to use
Thunderbird lately. I find the discussions here very enlightening so I soldier on.

--
Lew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSE 4 11-15-2006 02:40 AM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola Microsoft Certification 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd loyola MCSD 3 11-14-2006 05:18 PM
microsoft.public.certification, microsoft.public.cert.exam.mcsa, microsoft.public.cert.exam.mcad, microsoft.public.cert.exam.mcse, microsoft.public.cert.exam.mcsd realexxams@yahoo.com Microsoft Certification 0 05-10-2006 02:35 PM
microsoft.public.dotnet.faqs,microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.windowsforms,microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb Charles A. Lackman ASP .Net 1 12-08-2004 07:08 PM



Advertisments