Java methods and objects quiz

  • Admin
  • 1 min read

Nine questions on methods, parameters, classes, constructors and encapsulation.

Java

Java methods and objects quiz

9 questions, instant feedback

Question 1 of 9 What does a method's return type void mean?
Question 2 of 9 What is method overloading?
Question 3 of 9 What does a constructor do?
Question 4 of 9 What happens if a class declares no constructor?
Question 5 of 9 Why make a field private?
Question 6 of 9 What does the this keyword refer to?
Question 7 of 9 What does static mean on a method?
Question 8 of 9 Which pair of methods should usually be overridden together?
Question 9 of 9 What is a getter for?

Your answers stay in this browser. Nothing is sent to a server.