Error n Exception

Error n Exception

Difference between errors and exceptions?

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









Related Tutorials/Questions & Answers:
Error n Exception
Error n Exception  Difference between errors and exceptions
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
Advertisements
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
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  wHEN RUNTIME EXCEPTION CLASS IS SUB OF EXCEPTION CLASS HOW CAN'T HANDLE UNCHECKED EXCEPTION
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  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:ADS_TO_REPLACE_1 class NumberFormatExceptionEx...); } 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
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
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
BufferedReader(new InputStreamReader(System.in)); int n; double sum=0, m=1,s=1; System.out.println("enter the value of n"); String j =keyin.readLine(); n=Integer.parseInt(j); for(int k=1;k<=n;k
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
Exception handling
Exception handling  how to resolve file not found error exception
Error testing in JSP
or exception is encountered. Exception and error can be handled by using two page... whether it is error page. To test the error, you have to invoke the exception... Error testing in JSP      
error
error  while iam compiling iam getting expected error
Error-
Error-   Hello, I would like to know about XSD file. I try to print XML file but I am getting error SAXException-- says Content is not allowed in prolog. Please help me
error
error  i have 404 error in my program plz tell me yhe solution about
error
error  i have 404 error in my program plz tell me yhe solution about
error
/ServletUserEnquiryForm.shtml getting an error given below SQLException caught: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error please suggest
Error
Error  I have created ajax with php for state and city. When I change state then city will not come in dropdown list and it give me error as 'Unknown Runtime Error'. This error come only in IE browser, but in other brower
error
error  java.lang.unsupportedclassversionerror:bad major version at offset 6 how to solve this????   Hi, Please check the version of framework used and also the JDK version.ADS_TO_REPLACE_1 This type error also comes
error
error
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
error!!!!!!!!!
error!!!!!!!!!   st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern
Error
Error  Hi. I am getting error in the following code after the line I have commented as ERROR. How to solve this. Thanks in advance. package...;"); // ERROR out.println(" var pattern = /^\d{3,5
error
error  whats the error.............. import java.util.Scanner; public class g { public static void main(String[] args) { Scanner s=new Scanner(System.in); int d,x,y; System.out.println("Enter the first number
Java exception
Java exception  What is the difference between exception and error
Null Pointer Exception
; exception error arises during execution of java program. All values in Java... Pointer Exception 1.Point out the error in line of code. 2.Indicate the object... Null Pointer Exception     
exception handling
an exception whenever a calling method encounters an error providing...exception handling  What is an exception and what are the advantages of exception handling mechanism.   Java Exception Exception
exception handling
exception handling  explain about exception handling

Ads