Computer Science, asked by utpal8620, 16 days ago

Assign 123.5 to a variable and state the data type (Primitive or non-primitive).​

Answers

Answered by atrs7391
0

double v = 123.5;

Data type is Primitive.

Answered by Aswinakumar
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