I found these statements in the api docs for jframe class...it says that the public constructor for a jframe class throws an exception...then my question is that why dont we use try/catch blocks...?
Type: Posts; User: prashantkhurana145
I found these statements in the api docs for jframe class...it says that the public constructor for a jframe class throws an exception...then my question is that why dont we use try/catch blocks...?
JFrame
public JFrame()
throws HeadlessException
then why dont we use try/catch blocks while creating a new jframe...?