Results 1 to 3 of 3

Thread: throws

  1. #1
    java4amanda is offline Member
    Join Date
    Jan 2012
    Posts
    55
    Rep Power
    0

    Default throws

    Hi,

    i have a doubt regarding the throws keyword. Is it used only with the method prototypes?

    Thank you

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,778
    Blog Entries
    7
    Rep Power
    21

    Default Re: throws

    Quote Originally Posted by java4amanda View Post
    Hi,

    i have a doubt regarding the throws keyword. Is it used only with the method prototypes?

    Thank you
    Yep, the 'throws' keyword can only occur in a method header.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    java4amanda is offline Member
    Join Date
    Jan 2012
    Posts
    55
    Rep Power
    0

Similar Threads

  1. throws IOException ?
    By usuf in forum New To Java
    Replies: 2
    Last Post: 06-10-2011, 01:35 PM
  2. where to use throw and throws
    By javastuden in forum New To Java
    Replies: 4
    Last Post: 11-02-2010, 04:31 PM
  3. throws exception
    By simorgh in forum New To Java
    Replies: 1
    Last Post: 07-30-2010, 01:24 AM
  4. throws
    By jdgallag in forum New To Java
    Replies: 14
    Last Post: 02-11-2009, 02:07 AM
  5. throws Exception
    By javaplus in forum New To Java
    Replies: 1
    Last Post: 11-06-2007, 08:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •