i'm writing method inside service class in spring, i'm getting unexpected token error message while compiling. not see issue in code. pfb code.
@service public class helloservice{ @autowired hellodao hellodao; public long getname(long id) { person person = hellodao.findname(id);
return person.getname();
} }
whenever create new method, error message appearing irrespective of class in i'm creating. idea this?
when copy/paste code eclipse on windows, see little square @ end of 2 lines inside getname()
.
the square turns out unicode 'line separator' (u+2028).
they don't belong there. remove them.
eclipse gives error message:
syntax error on token "invalid character", delete token