Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

Mock Questions on Generics  RSS feed

 
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Few questions on Generics :
SCJP 5.0 Mock Exam - Generics (Part 1)
SCJP 5.0 Mock Exam - Generics (Part 2)
 
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krishna,

from your first question in part one:

6)System.out.println(num + �€œ �€� ;) ;



Perhaps replace the �€œ �€� ;) with something else.
Haven't read further yet.


Yours,
Bu.
[ January 13, 2007: Message edited by: Burkhard Hassel ]
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Krishna,

in the 3rd question of part 1 the answer options have numbers instead of characters, and i think, that (b) would be the correct answer (compiles with warning), but in my opinion the assignment " ArrayList b = a;" is perfect legal (no warning), but the next assignment will give a warning (casting a non-generic ArrayList to a generic one).
 
author and cow tipper
Posts: 5000
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Awesome. Looks good!

-Cameron McKenzie
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!