Error n Exception

Ads

 
 

Share on Google+Share on Google+

shahul hameed
Error n Exception
1 Answer(s)      4 years and 9 months ago
Posted in : Java Beginners

Difference between errors and exceptions?

Ads
View Answers

February 5, 2013 at 7:00 PM


Error : In Java Error indicates the problem which can't be controlled or guessed when it will occur. It indicates that there is a serious problem which an application shouldn't be try to catch this error. For example OutOfMemory error. Generally error indicates the error related to system and/or linked resources. Generally an error occurs at the compilation time.

Exception : In Java an Exception indicates the problem which can be handled and guessed. In a reasonable application it indicates the problem that should be try to catch and the application behave normally. For Example IOException. Exceptions are of two types Checked exceptions and Unchecked exceptions. Generally an exception occurs at execution time.

java.lang.Throwable is the base class of both classes java.lang.Error and java.lang.Exception


Ads









Related Tutorials/Questions & Answers:
Error n Exception
Error n Exception  Difference between errors and exceptions
Difference between error and exception ????????
Difference between error and exception ?  Can we handle a error in java if yes than give an code of an example? Difference between error and exception handling.......   Exceptions are things you can create/throw
Advertisements
exception error inservlet
exception error inservlet  Hi,i got the error as..below..wat could be the possible mistake ?THANK YOU!!! type Exception report message description The server encountered an internal error () that prevented it from fulfilling
Error and Exception in Java - Java Beginners
Error and Exception in Java  Hi, What is the base class for Error... of Error and exception Error dont have any base class. RuntimeException... _____|_________________ | | Error Exception
Error:No Class Found Exception:org.postgresql.driver
Error:No Class Found Exception:org.postgresql.driver  Error:No Class Found Exception:org.postgresql.driver while connecting JDBC With PostgreSQL 8.4 I m running My Program with java 6.0
Exception Handling-Error Messages in Program
Exception Handling-Error Messages in Program  Sorry about the first code block: import java.util.*; class GradeException extends Exception{ public GradeException(String s){ System.out.println(s); } } ----jGRASP exec: javac -g C
Exception Handling-Error Messages in Program
Exception Handling-Error Messages in Program  Hi Friend, I am having trouble running this code as per my prior question on Exception handling...[]) throws Exception{ This is where I begin to see problems with error messages
exception handling code for file not found error..
exception handling code for file not found error..  How to do exception handling for file not found error
Listener refused the connectio n with the following error
Listener refused the connectio n with the following error  Hi I am getting the following error while trying to connect oracle database. I.... Please find and reply me a solution. The error is like this as follows
"compilation error " & "throw an exception" - Java Beginners
"compilation error " & "throw an exception"  Hello. I have...=sql2.executeUpdate("Select * From Publishers"); a. Will throw an exception b. Will result in compilation error c. Will return the number of rows retrieved from
Null pointer exception error in Jsp - JSP-Servlet
Null pointer exception error in Jsp  Hi i write a login page. when i validate the login value then the nullpointer exception error is occured. my... then the following error is occured. HTTP Status 500
Null pointer exception error in Jsp - JSP-Servlet
Null pointer exception error in Jsp  Expert:Majid Hi i write a login page. when i validate the login value then the nullpointer exception error... then the following error is occured. HTTP Status 500
program created and compilation error of connection rightly created n tested
program created and compilation error of connection rightly created n... error for connection on which other programs are running smoothly...:( import...=con.createStatement(); } catch(Exception e) { System.out.println
Exception
Exception  public class FooException extends Exception { public..."); } public void calculate() throws FooException, Exception { try { int...(FooException ex) { // Print error and terminate application
exception
exception  wHEN RUNTIME EXCEPTION CLASS IS SUB OF EXCEPTION CLASS HOW CAN'T HANDLE UNCHECKED EXCEPTION
exception
exception  chek in and check out exception in java   Please visit the following link: Checked and Unchecked Exception
exception
arguments are not equalto two,throw a user defined exception "invalid parameter exception" ,otherwise display the two parameters.   Here is an example... is not equal to two then invalid parameter exception is thrown ,otherwise display the two
exception
exception  what is the use of catch block even though we have predefined exception object
exception
exception  example for numberformat exception   Hi Friend, Try the following code: class NumberFormatExceptionEx{ public static void...); } catch(Exception e){ System.out.println(e
exception
defined checked exception ââ?¬Å?InvalidCharcterFoundExceptionââ?¬Â? and creater a block of codes that will handle the exception
Exception
Exception  whis is the Arithmetic Exception in java? or define Arithmetic Exception with exp?   Arithmetic Exception occurs, when you divide a number by zero. Example public class TryCatch { public static void main
Exception
Exception   I was creating a table dynamically but it shows exception i.e shown down Suplier created0 Suplier created0 Suplier created0 Product created0 Product created0 Product created0 Product created0 could not fetch initial
exception
user defined unchecked exception  can we create user defined unchecked exceptions? if so what is the exact use of it in real time?   Please visit the following links: http://www.roseindia.net/java/java-exception/user
exception
exception  Identify the reason for SQLException exception, which is encountered when the developer tries to run the following code snippet to insert..."); ps.executeUpdate(); } catch(Exception e
Exception handling
Exception handling  how to resolve file not found error exception
error
,address,ss; int mos,phone; double it; public void accept(String n,string ad,int ph,String s,int ms) { name=n; address=ad...+"\nsubject.specification"+ss+"\n monthly salary"+mos+"\nincome tax
error
error  When I deploye the example I have this message cannot Deploy HelloWorld Deployment Error for module: HelloWorld: Error occurred during deployment: Exception while deploying the app [HelloWorld
Java exception
Java exception  What is the difference between exception and error
Error testing in JSP
can specify the error page to be invoked when any error or exception is encountered. Exception and error can be handled by using two page directives <..." %>. The JSP page where the exception can occur specifies the error page name
Exception handling in java
Exception handling in java We are going to discus about Exception handling in java. Java program many provides exception. We are handle of error in program when during execution in a program .we are generate of exception try() block
error
error  while iam compiling iam getting expected error

Ads

 
Advertisement null

Ads