On my practice exam, the following question was asked:
Which of the following are legal method signatures?
a) public void int foo()
b) private static int foo()
c) double foo(a, b)
d) String foo(String a, String b)
e) String foo(int a, String b)
I think option A is illegal, since you can't put "void" AND "int", right?
I think option B is fine, and I THOUGHT option C was legal too, but the answer key marks C as an illegal method signature.
I'm having trouble understanding why options D and E are legal, but option C isn't? Any ideas?