Given a single Java class, which of the following methods can it have?
A. foo(int a)
B. foo(int a, int b)
C. foo(double a)
D. foo(double a, double b)
E. foo(int b)
  1. All of the methods
  2. A, B, D, E
  3. A, B, C, D
  4. A, C, D, E

More information: Lesson 6.4.3

Which of the following is the correct definition for the getAge() method which is a member of the Person class? Note that {...} means there are appropriate statements inside the curly braces.

  1. int getAge();
  2. int Person.getAge() {...}
  3. int Person:getAge() {...}
  4. int getAge() {...}

More information: Lesson 6.3.4