Please help as this puzzles me as I am very new in JAVA ... thank you in advance

April 25th, 2012, 08:05 AM

Norm

Re: This Code worked on a separate class but does not work on another class

Please post the full text of the error messages and the full code that is causing them.

April 25th, 2012, 08:10 AM

ranjithfs1

Re: This Code worked on a separate class but does not work on another class

Are you trying to copy the code from the method player() into method main()
If so, here is the answer: methods having void type cannot return any values, the return statement needs to be replaced with something meaningful.

April 25th, 2012, 08:46 AM

titowinky

Re: This Code worked on a separate class but does not work on another class

@ ranjithfs1:
I am trying to copy the whole method from another class to main. Even if I remove the return there is still error.
"Multiple markers at this line
- Syntax error on token(s), misplaced construct(s)
- Syntax error on token "int", @ expected.

@Norm: That is the whole code already.

April 25th, 2012, 08:48 AM

Norm

Re: This Code worked on a separate class but does not work on another class

Please post the full text of the error messages and the code that is in the source file. Copy it exactly as it is in the source file and paste it here.