• 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
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!