Programs using datatypes

Today due to my personal issues I can able to attend my class. Even thought with help of my friends I got to what was thought today.

Today class is about using datatypes how the programs are been excecuted. Datatypes are int, float, char, long, boolean , string etc. using this I excecute a program today.

firstly int defines number.

float defines decimals

char defines single letter(s)

long defines long number.

string defines words.

Using all this I did a program.

class write{

public static void main(String args[])

{

int a=2;

float b=0.9f;

string c=sobhika;

long d=20000000l;

char e=’d’;

System.out.println(a+” “+b+” “+c+” “+d+” “+e+” “)

}

}


Leave a comment

Design a site like this with WordPress.com
Get started