Java - Methods and Code Reusability
Why does this method cause a compilation error?
public String getText() {
System.out.println("Hello");
}public String getText() {
System.out.println("Hello");
}String, so it must return a String value.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions