import java.util.Scanner;public class myBirthday
{
  public static void main (String[] args)
   {
 
  Scanner scan = new Scanner (System.in);
  
  System.out.println ("Enter your name (pinyin):");
  
  System.out.println ("Your name is:");
  
  
     String name = scan.nextLine();
  System.out.println (" The length of your name is:" +name.length());
}
}
  
然后编译的时候出现了 ----jGRASP exec: javac -g C:\Documents and Settings\xujin\Lb\MyBirthday assignment.javaMyBirthday assignment.java:8: { myBirthday /lq„ ”(
: myBirthday.java „‡ö-ð
public class myBirthday
       ^
1 ï ----jGRASP wedge2: exit code for process is 1.
 ----jGRASP: operation complete.

解决方案 »

  1.   

    大概是在哪呢?我用的编译环境是jGRASP
      

  2.   

    jGRASP  ???LZ你这行,用这种非主流的编译环境
      

  3.   

    他有个标记,标记着class,为什么这里会有错?
      

  4.   

    我用Eclipse运行了一下是可以的呀
      

  5.   

    你的源代码是正确的,在去我的机器上运行时时没有什么问题的,不知道你的问题在哪???你干嘛使用那些不知道的编译软件呢??建议重装jdk
      

  6.   

    建议楼主用eclipse试试。如果没错,再去你那个编译器上试。如果你那编译器有错,就跟老师解释!