• 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

Which method names are overloaded?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Mughal's mock exams, the following question is tough. I have no clue to answer it. Please tell me where I could find such information. Also, I am not sure if "yeild" is Mughal's typo or intention.
Which of the following method names are overloaded?
Select the three correct answers:
o The method name yeild in java.lang.Thread
o The method name sleep in java.lang.Thread
o The method name join in java.lang.Thread
o The method name wait in java.lang.Object
o The method name notify in java.lang.Object
 
Ranch Hand
Posts: 522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
join method -- 3 overloaded methods
void join()
void join(long millis)
void join(long millis, int nanos)
sleep method -- 2 overloaded methods
static void sleep(long millis)
static void sleep(long millis, int nanos)
yeild method -- There is only 1 method
static void yield()
wait method -- 2 overloaded methods
void wait(long timeout)
void wait(long timeout, int nanos)
notify method -- There is only 1 method
void notify()

You can always refer to the java API document here.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sleep
join
wait
I highly recommend that you look at the class library documentation when studying for the exam. One of the things that I found out is that never everything on the exam are in the study guides. Also you need to know which methods in the thread class can throw exceptions. There are other classes like object that have methods that can throw exceptions.
There is a book called Thinking in Java by Bruce Eckel that you should look at.
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Reginald Law:
sleep
join
wait
I highly recommend that you look at the class library documentation when studying for the exam. One of the things that I found out is that never everything on the exam are in the study guides. Also you need to know which methods in the thread class can throw exceptions. There are other classes like object that have methods that can throw exceptions.
There is a book called Thinking in Java by Bruce Eckel that you should look at.


Does this simply mean I can't pass SCJP solely reading up both K&B & Mughal's books?
Do we need to memorise all the methods in Java API to pass?
Certainly, if I get this one kind of question in SCJP, then my dream of scoring 100% would definitely be gone, that is provided that I study hard enough to score 100% .
Please someone or even K&B verfiy this.
Thank you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic