The literal <code>2.5</code> is of type
- A
String
- Bcheck_circle
double (default)
- C
float
- D
int
Explanation
By default, decimal literals are <code>double</code> in Java; <code>float</code> requires the suffix <code>f</code> (e.g., <code>2.5f</code>).
AP Computer Science A· difficulty 3/5
The literal <code>2.5</code> is of type
String
double (default)
float
int
Explanation
By default, decimal literals are <code>double</code> in Java; <code>float</code> requires the suffix <code>f</code> (e.g., <code>2.5f</code>).
Want 10 more like this — adaptive to your weak spots?