Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (7k points)
I am very new to Java and have issues with the data types. Can someone tell me the default values of different primitive data types in Java?

1 Answer

0 votes
by (13.1k points)

The default values of different datatypes in Java are:

boolean- false

char- ‘\u0000’

byte- 0

short- 0

int- 0

long- 0L

float- 0.0f

double- 0.0d

Related questions

0 votes
0 answers
0 votes
1 answer
asked Mar 23, 2021 in Java by dev_sk2311 (44.4k points)
0 votes
1 answer
0 votes
0 answers
asked Jun 24, 2021 by Dhananjay dubey (120 points)

Browse Categories

...