Assign 123.5 to a variable and state the data type (Primitive or non-primitive).
Answers
Answered by
0
double v = 123.5;
Data type is Primitive.
Answered by
1
Answer:
Primitive Data Types
Data types in Java are classified into 4 aspects as int, float, character and boolean. But, in general, there are 8 data types. They are as follows:
boolean data type
byte data type
char data type
short data type
int data type
long data type
float data type
double data type
You can refer to the below figure to understand the different data types with respect to the memory allocated to them.
Similar questions
Hindi,
8 days ago
Social Sciences,
8 days ago
Math,
16 days ago
Computer Science,
16 days ago
Physics,
7 months ago