Home » JAVA Programming » Modifier Types » Question
  1. All the variables of class should be ideally declared as ?
    1. default
    2. private
    3. public
    4. protected
    5. None of these
Correct Option: B

The variables should be private and should be accessed with get and set methods.



Your comments will be displayed only after manual approval.