Skip to main content



      Home
Home » Newcomers » Newcomers » }; significance
}; significance [message #1725762] Mon, 07 March 2016 08:35 Go to next message
Eclipse UserFriend
Hi while implementing try catch block I observed this

try {
date = formatter.parse(str);
} catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
};


No error with };

whereas
try {
date = formatter.parse(str);
}; catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
};

It showed error
Can anyone explain this concept? ,What is the significance of semicolon after parenthesis

[Updated on: Mon, 07 March 2016 08:37] by Moderator

Re: }; significance [message #1725782 is a reply to message #1725762] Mon, 07 March 2016 10:18 Go to previous messageGo to next message
Eclipse UserFriend
No Message Body
Re: }; significance [message #1725794 is a reply to message #1725782] Mon, 07 March 2016 12:05 Go to previous message
Eclipse UserFriend
Those aren't parentheses, they're braces. The semicolon ends the statement, and 'try' must be paired with 'catch' or 'finally'. The first case is not an error, it just does nothing useful there.
Previous Topic:Eclipse mars 2 converts numbers into wierd chars
Next Topic:Creating simple bluetooth server
Goto Forum:
  


Current Time: Wed Jul 23 21:12:28 EDT 2025

Powered by FUDForum. Page generated in 0.08043 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top