Java Constructor and Methods - Quiz

  • AAt line 1, constructor Tester must be marked public like its class
  • BAt line 2, constructor call
  • CAt line 3, compilation error, ambiguity problem, compiler can't determine whether a constructor
  • DAt line 4
  • A It can be accessed easily by the class loader.
  • BIt can be accessed by every method or variable without any hindrance.
  • CIt can be executed without creating any instance of the class.
  • DNone of the above
  • Apublic Test(void)
  • BTest( )
  • CTest(void)
  • Dpublic Test( )
  • Avoid atnyla() {} throws IOException
  • Bvoid atnyla() throws IOException{}
  • Cvoid atnyla() throw IOException{}
  • Dvoid atnyla(void) throws IOException{}