Java Tutorial Part 4 | Java-10 | Variable Types

Java

Video is ready, Click Here to View ×


you can copy and paste below code in main method on your machine.

// Minimum value can be -128 and maximum can be 127 (8 bit value)
Byte byteVar1 = 127;

// Minimum value can be -32768 and maximum can be 32767 (16 bit value)
Short shortVar1 = 32767;

// minimum value can be -2 to the power 31 and a maximum value of 2 to the power 31 – 1
Integer intVar1 = 1234567890;

// minimum value can be -2 to the power 63 and a maximum value of 2 to the power 63-1
Long langVar1 = 1234567890l;

// …

Leave a Reply

Your email address will not be published. Required fields are marked *