Which of the following is the default value of an int variable declared as an instance variable?

  • 0
  • 1
  • -1
  • The default value depends on the specific situation.
In Java, the default value of an instance variable of type int is 0. This is true for all numeric types in Java. The other options are not the default values for int instance variables.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *