What is size of non primitive data type in java?
Answers
Answered by
1
Primitive data types are pre-defined data types which are available in most of the programming languages. It represents a single value.
There are eight types of primitive data types. Int, byte, short, long, float, double, char, Boolean.
Integer Data types
It represents integer data types i.e. numbers not having any decimal values. For example, 567, -2345 etc.
It is sub divided into below types
Byte, Short, Int, Long
Data TypeMemory SizeDefault valueMinimum ValueMaximum ValueExampleByte1 byte0-128+127Byte b=2Short2 bytes0-32768+32767Short s=2345Int4 bytes0-2147483648+2147483647Int i=25long8 bytes0L-9223372036854775808
There are eight types of primitive data types. Int, byte, short, long, float, double, char, Boolean.
Integer Data types
It represents integer data types i.e. numbers not having any decimal values. For example, 567, -2345 etc.
It is sub divided into below types
Byte, Short, Int, Long
Data TypeMemory SizeDefault valueMinimum ValueMaximum ValueExampleByte1 byte0-128+127Byte b=2Short2 bytes0-32768+32767Short s=2345Int4 bytes0-2147483648+2147483647Int i=25long8 bytes0L-9223372036854775808
Answered by
1
Explanation:
Primitive Types. Primitive types are the most basic data types available within the Java language. There are 8: boolean , byte , char , short , int , long , float and double . These types serve as the building blocks of data manipulation in Java.
Hopess.... it will help..!
Similar questions