True/False 4

  1. Java assigns a default value to a data member of a class if the data is not initialized.
  2. The default value for a data member of boolean type is true.
  3. The default value null is assigned to a data member of object type, even though the data member is not created yet.
  4. Java assigns a default value to a local variable in a method if the variable is not initialized.
  5. The default constructor has no arguments.
  6. You can always use the default constructor even though the non-default constructors are defined in the class.
  7. You can access a class variable using a syntax like objectName.classVariable or ClassName.classVariable.
  8. You cannot use the private modifier on classes.
  9. You cannot use modifiers on local variables inside a method.
  10. A static method in a class can access the instance variables in the same class.
  11. A static method in a class can access the class variables in the same class.
  12. You can declare a local variable in a method that has same name as an instance variable in the class.
  13. You can declare variables of the same name in a method even though they are in the same block.
  14. You can declare variables of the same name in a method if they are in non-nesting blocks.
  15. You can create an instance of the Math class.
  16. Visited times since 5 Feb 1999.