0
Make this code to generate an output or find the error?
2 Respuestas
+ 5
You're missing a return statement in this method. You can't just do a System.out.println() you also need to return a String value or change its return type to void
String show(){
System.out.println(name);
}
+ 3
I'm not sure what you're using to copy paste this code but there's also some invisible characters showing.
I'll show you a screen shot here:
http://i.imgur.com/pH7WXDr.png
See all those pink highlighted decimals?
You may want to backspace (then re-space) all empty extra-spaced spots. Then do what @Chaotic said, and it should work fine.