Question PRG-JAVA-0060
MediumWhat is the default value of an int field and of an object field in a Java class?
- A.
0 and null
- B.
1 and an empty object
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
What is the default value of an int field and of an object field in a Java class?
0 and null
1 and an empty object
Sign up free to see the answer and a step-by-step explanation.
Compilation error if not set
Garbage values