package JavaSessions; public class DataTypes { //8:30 AM IST //this is my first java code /*this is my java code and I'm so happy data types concept*/ public static void main(String[] args) { //Primitive Data types: int, double, boolean, char //Non Primitive Data Types: String, Array //1. int (4 bytes): byte (1byte), long(8 bytes), short(2 bytes) int i = 10; i = 20; int i1 = 20; int j = 100; int k = -10; int p = 0; int age = 25; System.out.println(i); System.out.println(age); System.out.println(i+j); //2. double (8 bytes), float(4 bytes) double d1 = 12.33; double d2 = -12.33; double d3 = 100; //100.00 System.out.println(d1); //3. char: char c1 = 'a'; char c2 = '$'; char c3 = '1'; char gender = 'M'; //4. boolean: boolean b1 = true; boolean b2 = false; //String: is a class in java String s1 = "Hello World"; String s2 = "Selenium"; String s3 = "Hi this is my java code"; String s4 = "1000"; String s5 = "12.33"; System.out.println(s1); System.out.println(s4); System.out.println(100); System.out.println("Hello Testing"); System.out.println(s1+s2); float v = (float) 12.33; System.out.println(v); } }