• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ch7, self test, q14, and q16

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

in question 7.14 page 632
A) <? extends CharSequence> makes it not correct because, It will return something "read only"

Is that Correct??
--------------------------------------------
7.16 on page 634

I am confused about answer C, why it is not correct ?, who said that
the return type List<? super E>, will be evaluated to List<Integer> ..??,

I suppose the compiler will accept to return List<Number>
because Number is supertype of Integer and does not break the decleration <E extends Number>

What I missed ..???

Thanks,
I will go for the exam next week, and I am not scared, which scares me !!!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic