aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes ? extends Number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "? extends Number" Watch "? extends Number" New topic
Author

? extends Number

Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
when we have a List<? extends Number> and use get() to get the elements from the list what do we get? Number or Objects?


scjp 1.6 91%, preparing for scmad
"Time to get MAD now.. we will get even later"....by someone unknown
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9293
    
  17

Did you try to see what it returns Number or Object??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Rajiv Chopra
Ranch Hand

Joined: Dec 19, 2008
Posts: 62
Raju Champaklal wrote:when we have a List<? extends Number> and use get() to get the elements from the list what do we get? Number or Objects?

anything extends number.


Rajeev Kumar
SCJP 6.0 Certified 96%
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
ya i tried....it gave me Number..i tried it after posting the question
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ? extends Number