👤

give six java data types and write its definition​

Sagot :

Answer:

Integer: The int data type is a 32-bit signed two's complement integer. Its value-range lies between - 2,147,483,648 (-2^31) to 2,147,483,647 (2^31 -1) (inclusive). Its minimum value is - 2,147,483,648 and maximum value is 2,147,483,647. Its default value is 0.

Floating-point number: The precision of a floating point value indicates how many digits the value can have after the decimal point. The precision of float is only six or seven decimal digits, while double variables have a precision of about 15 digits.

Boolean: the Boolean data type is a primitive data type, which means it comes packaged with the programming language. A Boolean data type can only have a value of either true of false.Therefore the result of a Boolean operation is only true or false

String: Is a sequence or string of connected characters, whereby the char data type represents a single character.

Character: The Java char keyword is a primitive data type. It is used to declare the character-type variables and methods. It is capable of holding the unsigned 16-bit Unicode characters.