Java Constructor and Methods - Quiz

  • A At line 1, constructor Tester must be marked public like its class
  • B At line 2, constructor call
  • C At line 3, compilation error, ambiguity problem, compiler can't determine whether a constructor
  • D At line 4
  • A reference variables
  • B objects
  • C instance variables
  • D None of these
  • A (int)Math.random()
  • B (int)Math.random() + 1
  • C (int)(Math.random() + 0.5)
  • D (int)(Math.random() + 0.2)
  • A public
  • B private
  • C static
  • D protected