arithmetic operations with data tyoes
arithmetic operations with data tyoes
// arun mavuram// public class integer { public static void main(String[] args) { int a; // initialization // a=10; // declaration // int b=9; // initialization and declaration // byte c=14; byte d=2; short e=4; short f=5; long g = 20; long h = 20; System.out.println("sum of two numbers 10 and 9 :" +(a + b)) ; System.out.println("subtraction of two numbers 14 and 2 :" + (c - d) ); System.out.println("multiplication of two numbers 4 and 5 :" + (e * f) ); System.out.println("division of two numbers 20 and 20 :" + (g / h) ); } } /* output sum of two numbers 10 and 9 :19 subtraction of two numbers 14 and 2 :12 multiplication of two numbers 4 and 5 :20 division of two numbers 20 and 20 :1 */
Please send comments to
vgdarur.javafive@blogger.com
Copyright © 2008 - iForeRunner.com
http://www.iforerunner.com/