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

AWS Pricing Basics

AWS Pricing Basics: How to Manage Cloud Costs Cloud computing allows businesses to access infrastructure without purchasing all their h...