Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners incompatble type error
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Shirish Mishra
incompatble type error
1 Answer(s)      4 years and a month ago
Posted in : Java Beginners


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


Advertisement
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...;} } On Compilation the code show an illegal start of type error. Output
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. This type error also comes when java file
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
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
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  The content of element type "struts" must match "(package|include|bean|constant
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
type casting
type casting  what is type casting
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
error
"+it); } } this is my program i am getting an error saying cannot find symbol class string
Type casting
Type casting  how to type cast a string value to byte array
type casting
List (object type) <Object> totalList(int pi){ try{ Query q...type casting  <--bean class-->method calllist is of object type...){ return null; } how to type cast object type to entity type
type casting
type casting  int n=20; n=sizeof((char)(float)n); what is n value
data type
data type  which data type is used to store video file in mysql databse
Advertisements
 

 

 

DMCA.com