Source Code
package MyPackage;
public class variables {
public static void main(String[] args) {
String name = "Nawlesh";
int myNum = 19;
float myFloat = 13.3f;
char myLetter = 'D';
boolean myBool = true;
short myVariable = 10;
double myDouble = 13.33;
System.out.println(name);
System.out.println(myNum);
System.out.println(myFloat);
System.out.println(myLetter);
System.out.println(myBool);
System.out.println(myVariable);
System.out.println(myDouble);
}
}
Output
Nawlesh
19
13.3
D
true
10
13.33
0 Comments