Answer Posted / sandeep tyagi
The functional diiference, in terms of the compiler, is
that you don't have to declare errors in throws clauses on
methods, or catch them.
Conceptually, an Error means something has gone wrong with
your program, which should usually give up and crash,
whereas an exception is for an unusual situation that you,
as a programmer, anticipated as a possibilty. So, for
example, a divide-by-zero is an Error, but attempting to
read a file and finding it doesn't exist is an Exception.
| Is This Answer Correct ? | 78 Yes | 55 No |
Post New Answer View All Answers
What does %4d mean in java?
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.
What is multithreading and its advantages?
Is node a data type in java?
Is null a string?
when should you use stringbuilder class in a program?
Can we use a default constructor of a class even if an explicit constructor is defined?
What is meant by main method?
what is optional in java 8?
Explain about OOPS concepts and fundamentals.
What is mean by encoding?
How to read and write image from a file ?
Is alive and join method in java?
What is the size of an array?
What is sortedset in java?