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


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

Re: JLS 3/e -- Lots Of Errors

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: JLS 3/e -- Lots Of Errors
References (3 earlier) <iil05f$mp6$4@lust.ihug.co.nz> <%8o3p.61505$8_2.1344@newsfe17.iad> <iil5a1$q34$3@lust.ihug.co.nz> <40p3p.37003$5k5.12664@newsfe03.iad> <iil7du$rac$3@lust.ihug.co.nz>
Message-ID <SMw3p.72075$ZS4.20129@newsfe07.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2011-02-06 08:48 -0400

Show all headers | View raw


On 11-02-06 12:18 AM, Lawrence D'Oliveiro wrote:
> In message<40p3p.37003$5k5.12664@newsfe03.iad>, Arved Sandstrom wrote:
>
>> On 11-02-05 11:41 PM, Lawrence D'Oliveiro wrote:
>>
>>> In message<%8o3p.61505$8_2.1344@newsfe17.iad>, Arved Sandstrom wrote:
>>>
>>>> On 11-02-05 10:14 PM, Lawrence D'Oliveiro wrote:
>>>>
>>>>> In message<iijn9l$ccs$2@news.albasani.net>, Lew wrote:
>>>>>
>>>>>> Lawrence D'Oliveiro wrote:
>>>>>>
>>>>>>> * Section 4.5.1.1, page 55:
>>>>>>>
>>>>>>>          T<= ? extends T
>>>>>>>          T<= ? super T
>>>>>>>
>>>>>>> One of these is the wrong way round.
>>>>>>
>>>>>> Nope.  Both are true.
>>>>>
>>>>> In that case, why is one called an “upper bound” and the other a “lower
>>>>> bound”?
>>>>
>>>> Because the first (? extends T) specifies an upper bound (namely T), and
>>>> the second (? super T) specifies a lower bound (in this case also T).
>>>
>>> So do you understand what the “<=” symbol is supposed to represent?
>>>
>> It represents precisely and exactly what this sentence:
>>
>> "A type argument TA1 is said to contain another type argument TA2,
>> written TA2<= TA1, if the set of types denoted by TA2 is provably a
>> subset of the set of types denoted by TA1"
>
> So look again at the two relations I quoted above, and see how the
> definition you quoted is consistent with one of them, but not the other.
> Hint: go and look up the meaning of “extends” if you have to.

I'm cool with "extends" in wildcards, I use it often enough. Perhaps you 
should explain what you believe the problem to be.

AHS

-- 
We must recognize the chief characteristic of the modern era - a 
permanent state of what I call violent peace.
-- James D. Watkins

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


Thread

Re: JLS 3/e -- Lots Of Errors Lew <noone@lewscanon.com> - 2011-02-05 09:36 -0500
  Re: JLS 3/e -- Lots Of Errors Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-06 21:29 -0500
    Re: JLS 3/e -- Lots Of Errors Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-06 22:00 -0500
      Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-08 09:20 +1300
    Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 15:45 +1300
  Re: JLS 3/e -- Lots Of Errors Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-02-06 08:48 -0400
    Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 12:31 +1300
      Re: JLS 3/e -- Lots Of Errors Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-06 20:44 -0500
        Re: JLS 3/e -- Lots Of Errors Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-02-07 14:50 +1300

csiph-web