Monday 12 June 2017

Simple Program of Typecasting in java

Simple Program of Typecasting in java Program:

package JavaCoders;
class Conversion
{
public static void main(String[] args)
{
String x="20000";
int a=67;
short b;
long c;
float d;
double e;
char f;
String z;
b=(short)a;
c=a;
d=a;
e=a;
f=(char)a;
int p=Integer.parseInt(x);
System.out.println(p);
z=String.valueOf(a);
System.out.println(z);
System.out.println(b);
System.out.println(c);
System.out.println(d);
System.out.println(e);
System.out.println(f);
}
}

OUTPUT:


Simple-Program-of-Typecasting-in-java

1 comment:

  1. Coin Casino Review – Up to $500 Bonus - CasinoWow
    Coin Casino is an excellent casino for players who want choegocasino to learn about the casino games, 인카지노 bonuses and the various promotions offered. The casino has 샌즈카지노 the latest  Rating: 3.5 · ‎Review by CasinoWow

    ReplyDelete

Oracle / PLSQL: FOR LOOP

set serveroutput on; declare a1 varchar2(100); begin select count(*) into a1 from employees; for i in 1..a1 loop dbms_output.put_line...