Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

tiger beta: writing generic type

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm taking the tiger beta exam in a week, and would like to know if it is required to be able to write a whole generic type (as described in chapter 2.10 of o'reilly's developper notebook). from objective 6.4, i can't really tell. i though maybe we just have to be able to work with the built-in generics types.

also, i have another question on generics. depending wether you (wrongly) parametrize your methods or variables, a ClassCastException, a compile-error or some lint might popup. it's pretty clear for me to tell if a code will compile+run or not, but i have difficulty to tell which of these can happen (ClassCastException, compile-error, lint). to which extent we shall be able to distiguish which of these can happen?

thanks in advance for any help.
renaud
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No code writing is required, however, you might see some drag and drop questions that required you to select the correct answer to the provided *boxes*.

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

also, i have another question on generics. depending wether you (wrongly) parametrize your methods or variables, a ClassCastException, a compile-error or some lint might popup. it's pretty clear for me to tell if a code will compile+run or not, but i have difficulty to tell which of these can happen (ClassCastException, compile-error, lint). to which extent we shall be able to distiguish which of these can happen?



Yeah, this is one of the topics which is giving me headaches. Btw, I haven't taken the beta exam so no idea what kind of questions will be asked. You can read JLS3 Section 4.8 Raw Types to learn about the conditions in which a compiler will generate an unchecked warning.

Joyce
 
Renaud Richardet
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear Nick, dear Joyce

ok, now it gets clearer.
thanks for your answers & have a nice day.

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


I haven't taken the beta exam so no idea what kind of questions will be asked


Dont worried, the questions are similar to those you can see in non-beta exams.

Do pay attention to the *spelling* of the methods, otherwise, you might be trapped.

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

Dont worried, the questions are similar to those you can see in non-beta exams.

Do pay attention to the *spelling* of the methods, otherwise, you might be trapped.



Thanks Nick for the tips!!!
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

I took the Beta exam today and it was a long and hard test. I found generic type questions to be pretty difficult. I would suggest whoever is preparing to go for the beta to try out various examples. It really helps.

Let me know if you guys have any questions.

-Shankar

SCJP 1.4 SCBCD 1.3 SCWCD 1.4 SCEA (Part I) SCJP 5.0 ( Waiting for the results)
 
Joyce Lee
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Shankar,

Thanks for sharing your experience with us.

I would suggest whoever is preparing to go for the beta to try out various examples. It really helps.


What various examples are you referring to?

Joyce
 
Shankar Narayenen
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

What I meant was to write lots of test code by yourself and try to figure out the acceptable ways to write generic code.

I refered to the tutorial by Gilad bracha and also wrote some test code to understand the basics of generic types.

HTH,
Shankar.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic