View Single Post
  #2 (permalink)  
Old 02-04-2008, 09:25 AM
CaptainMorgan's Avatar
CaptainMorgan CaptainMorgan is offline
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 839
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Taken from the wiki on keywords, which you can read for yourself, I'll just throw out very general examples.

Well first, what is your understanding of basic English? Throw is an irregular verb, while throws is a third person singular verb. More basically:
Quote:
throw a baseball
and
Quote:
how many throws did he commit?
That said, let's apply this concept to the Java language.
Code:
... if (baseball == strike) { throw strikeException; } ...
respectively, as in the basic English example:
Code:
public static void PitcherMethod throws strikeException { ... }
Hope this helps.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)

Last edited by CaptainMorgan : 02-04-2008 at 09:30 AM.
Reply With Quote