//Basic Introduction to DataTypes in Java //2019 Java Learning Repo //written by rwx-777 public class All_Java_Datatypes { public static void main(String[] args) { //This is an introduction to all the different Java DataTypes there are. //The Basic DataTypes in Java are called Primitive Data Types boolean This_is_a_Bool = true; //by default a Boolean is false //Size = 1 bit //If memory is short use this byte This_is_a_Byte = 1; //by default its 0 //Size = 8 bits //Declaring a character char This_is_a_char = 'G'; //by default \u0000 //Size = 16 bits // If you are short on memory you can use this too short This_is_a_short = 3; //by default 0 //Size = 16 bits //Integer Data Types are generally used for numeric values int This_is_a_Int = 777; //by default 0 //Size 32 bits long This_is_a_long = 373676424; //by default 0 //Size 64 bits float This_is_a_float = 4.67676f; //by default 0.0 //Size = 32 bits double This_is_a_double = 345.567; //by default 0.0 //Size = 64 bits } }