MCQ Single Best Answer Easy

QWhat is the default value of an int datatype in Java?

ID: #22196 int - Data Type in Java 105 views
Question Info
#22196Q ID
EasyDifficulty
int - Data Type in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 0
  • B 0.0
  • C null
  • D undefined
Correct Answer: Option A

Explanation

In Java, the default value of an int datatype is 0. If you declare an int variable without assigning a value to it, it will automatically be initialized to zero.

Share This Question

Challenge a friend or share with your study group.

Related MCQ Questions