package helloworld;
import java.lang.*;
import java.io.*;/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class Hello {
    public Hello() {
        super();
    }
    public String readname() {
        int ch;
        String getname = "";
        boolean ok = false;
        System.out.println("请输入您的姓名:");
        while (!ok) {
            try {
                ch = System.in.read();
                if (ch < 0 | (char) ch == '\n')
                    ok = true;
                else if ((char) ch != '\r')
                    getname = getname + (char) ch;
            } catch (IOException e) {
                ok = true;
            }
        }
public static void main(String[] args) {
        String name;
        Hello hello = new Hello();
        name = myHello.readname();
        System.out.printin("欢迎您," + neme + "!");
        System.out.printin("zhuninchenggong!");
    }
}想知道在最后怎么编译总是过不了 似乎没错 郁闷了 在JBUILDER2006上编译的 求助 谢谢了 
编译错误提示为:"Hello.java": '}' expected at line 44, column 6 怎么理解 编译器没汉化的 郁闷  谢谢 您的解答!!

解决方案 »

  1.   

    少了一个“}” 在public static void main(String[] args) 这句话上面一行!
      

  2.   

    System.out.printin("欢迎您," + neme + "!");
            System.out.printin("zhuninchenggong!");
    是println不是printin
      

  3.   

    谢谢了 还有个编译问题不知道出在哪里 郁闷 谢谢解答
    Application main class is not configured
     运行的时候总是出现这个问题 这是怎么回事??
      

  4.   

    Hello hello = new Hello();
     name = myHello.readname();
     System.out.printin("欢迎您," + neme + "!");
    myHello 应该是hello吧
    neme    应该是name吧
      

  5.   

    那要怎么样去修改呢??
    主类不是main class就可以了吗?? 还要 怎么去生成 ?? 谢谢解答!
      

  6.   

    public class Hello {
        public Hello() {
            super();
        }
        public String readname() {
            int ch;
            String getname = "";
            boolean ok = false;
            System.out.println("请输入您的姓名:");
            while (!ok) {
                try {
                    ch = System.in.read();
                    if (ch < 0 | (char) ch == '\n')
                        ok = true;
                    else if ((char) ch != '\r')
                        getname = getname + (char) ch;
                } catch (IOException e) {
                    ok = true;
                }
            }
        }//却个大括号
    public static void main(String[] args) {
            String name;
            Hello hello = new Hello();
            name = myHello.readname();
            System.out.printin("欢迎您," + neme + "!");
            System.out.printin("zhuninchenggong!");
        }
    }
      

  7.   

    现在这个问题解决了 但是找不到主类找不到的问题了 郁闷了 JBUILDER一点也不熟悉
      

  8.   

    JBUILDER中没有配置主类的原因。