MCQ Single Best Answer Easy

QWhat is the default value of a long datatype in Java?

ID: #22197 long - Data Type in Java 68 views
Question Info
#22197Q ID
EasyDifficulty
long - 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

The default value of a long datatype in Java is 0. If you declare a long variable without initializing it explicitly, it will be set to zero by default.

Share This Question

Challenge a friend or share with your study group.

Related MCQ Questions