164k views
5 votes
All the following data types are Java primitive data types? A) byte, boolean, char, short, integer, long, float, double B) byte, boolean, char, short, int, long, float, double C) byte, boolean, char, string int, long, float, double D) byte, boolean, char, short, int, decimal, float, double

1 Answer

6 votes

Final answer:

The correct answer is option B) byte, boolean, char, short, int, long, float, double.

Step-by-step explanation:

The correct answer is option B) byte, boolean, char, short, int, long, float, double. These are all Java primitive data types. Each data type in Java serves a specific purpose and has a specified range of values. For example, the 'byte' data type is used to store small numbers (-128 to 127) and the 'int' data type is used to store larger whole numbers (-2,147,483,648 to 2,147,483,647

User Prasad Bhosale
by
8.1k points