incompatble type error

incompatble type error

class ArithmeticExceptiontest { public static void main(String args[]) { int num1 = 0; int num2=10; int num3=0; try { num3=num2/num1; System.out.println("The result =" +num3); } catch( ArithmeticException e) { System.out.println("Division by Zero is done" +e); } } } trows incampatble type error

View Answers

November 19, 2010 at 4:57 PM

Hi Friend,

Your code works fine here.

Thanks









Related Tutorials/Questions & Answers:
incompatble type error
incompatble type error  class ArithmeticExceptiontest { public static void main(String args[]) { int num1 = 0; int num2=10...); } } } trows incampatble type error
Array list in Java - arraylist type error
Array list in Java - arraylist type error  I am using Array list in Java but when i compile i get array list type error. Can anyone please explain what is array list type error and why it occurs
Advertisements
data type used to store name.(getting an error)
data type used to store name.(getting an error)    Statement stm=con.createStatement(); String query="select * from employee where ename... getting an error like dis: "ename cannot be resolved to a variable" whats
Java Error In comapitable Type in statement - Java Beginners
Java Error In comapitable Type in statement  Here I want to Check...(j1,"Error in submitting data!"); }//end catch }// end Action...(Exception e){ JOptionPane.showMessageDialog(j1,"Error in submitting data
Java error illegal start of type
Java error illegal start of type       The Java error illegal start of type... start of type error. Output Compiling 1 
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  The content of element type "struts" must match "(package|include|bean|constant
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
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
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
"+it); } } this is my program i am getting an error saying cannot find symbol class stringADS
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
PHP Type Hinting
about the cause of the error and type hinting more preciously...PHP Type Hinting Function: Type hinting is a special type of function which... a value into objects of a class or to an array. Type Hints only supports object
type mismatch
type mismatch  Statement s= con.createStatement(); this line gives error of "type mismatch" I am using eclips nd new to servlet nd JDBC, Please help me, Thank you
type casting
type casting  what is type casting
Type casting
Type casting  how to type cast a string value to byte array
Java error identifier excepted
an Identifier error as we have not specified the proper type of data type... Java error identifier excepted       Java Error Identifier excepted occurred
type casting
type casting  <--bean class-->method calllist is of object type... List (object type) <Object> totalList(int pi){ (adsbygoogle = window.adsbygoogle || []).push({}); try{ Query q= em.createQuery
data type
data type  which data type is used to store video file in mysql databse
type casting
type casting  int n=20; n=sizeof((char)(float)n); what is n value
Java error incompatible types
operator = is used to show you an incompatible type error in java rather than... Java error incompatible types       Java Error incompatible types occurred when
ModuleNotFoundError: No module named 'type'
is throwing following error: ModuleNotFoundError: No module named 'type' How to remove the ModuleNotFoundError: No module named 'type' error..., ModuleNotFoundError: No module named 'type' error will be solved. Thanks
ModuleNotFoundError: No module named 'type'
is throwing following error: ModuleNotFoundError: No module named 'type' How to remove the ModuleNotFoundError: No module named 'type' error..., ModuleNotFoundError: No module named 'type' error will be solved. Thanks
ModuleNotFoundError: No module named 'type'
is throwing following error: ModuleNotFoundError: No module named 'type' How to remove the ModuleNotFoundError: No module named 'type' error..., ModuleNotFoundError: No module named 'type' error will be solved. Thanks
ModuleNotFoundError: No module named 'type'
is throwing following error: ModuleNotFoundError: No module named 'type' How to remove the ModuleNotFoundError: No module named 'type' error..., ModuleNotFoundError: No module named 'type' error will be solved. Thanks
Java error missing return statement
Java error missing return statement       Java error missing return statement are those error in Java that occurred when a programmer forget to write
error message
error message  Sir i make one form facility with insert,update,delete.i want to error msg if any type of the data is missing and display in error msg which of the data is misssing
Java error
= 88; while(a } //it is giving compile time error .....illegal start of type
Java error
= 88; while(a } //it is giving compile time error .....illegal start of type
Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.String'
Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type... the value of OptionSetValue it is throwing following error: Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.String
fastest type of JDBC driver
fastest type of JDBC driver  What is the fastest type of JDBC driver
Document Type Definition
Document Type Definition  What is Document Type Definition
coding for re-type password
coding for re-type password  coding for re-type password
jsp error
;username</td><td><input type="text" name="username" maxlength="16"><...;<input type="password" name="password" maxlength="10"><br></td>... type="password" name="repass" maxlength="10"><br></td></tr>
The Unix error
will show an error message if user leave the fields blank. <script> function...;tr> <td>Username:</td> <td><input type="text" name...;/td> <td><input type="password" name="password"></td>
jsf error
jsf error  type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.RuntimeException: Cannot
TypeError: argument of type 'NoneType' is not iterable
TypeError: argument of type 'NoneType' is not iterable  Hi, How I can resolve the following error: TypeError: argument of type 'NoneType' is not iterable Thanks
Type casting in java
to derived type. B b=a; // compile time error require casting B b=(B...Type casting in java In this section you will learn about type casting in java. Type casting is to convert one type to another type. Java support two types

Ads