Friday, 15 January 2010

java - System.out.print(" "); syntax error on token ".", @ expected after this token -



java - System.out.print(" "); syntax error on token ".", @ expected after this token -

i'm getting error on piece of code , can't figure out what's wrong.

public class enc { //the look-up table position of available characters public static final string lut="*, .abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; scanner sc=new scanner(system.in); system.out.print("input sentence want encode."); string s= sc.nextline(); }

you need set code within method:

public class enc { //the look-up table position of available characters public static final string lut="*, .abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"; public static void main(string[] args) { scanner sc=new scanner(system.in); system.out.print("input sentence want encode."); string s= sc.nextline(); } }

java

No comments:

Post a Comment