What is the difference between throw and throws?
What is the similarity between try and throw?
Answer Posted / amar
throw is a statement level.throws is a method level.
In manual exception handling,we can also use the throws to
handle the excepions by the jvm,insted of handling there.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What advantage do java's layout managers provide over traditional windowing systems?
How do you read and print a string in java?
Is there a case when finally will not execute?
What are latest features introduced with java 8?
What is meant by call by reference?
What is the purpose of the file class in java programming?
What do you know about the garbage collector?
What is substring in java?
Which sorting is best in java?
Is java a compiler?
What is threaded programming and when is it used? : Java thread
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.
How is treeset implemented in java?
How many functional interfaces does java 8 have?
What is remote method invocation (rmi)?