/**   
* Sample application using the simple text editor component that   
* supports only one font.   
* @author Timothy Prinzing   
* @version 1.16 09/23/99   
*/     package MyProject.theFirstApp;
      class notepad extends JPanel {                    
                 final int MAX_NUM=1000;                    
                 final long rate=999;                    
                 String STR;                 
          char theFirstcharacter;    
  public static void main(String[] args) {             
      try {            
             String vers = System.getProperty("java.version");       
          if (vers.compareTo("1.1.2") < 0) { ......}   
          }         
          private Component CreateToolbar() {   ......   }  
  }

解决方案 »

  1.   

    包 类 变量 方法命名
    有try没catch。
    等等
      

  2.   

    包名全部都要用小写类名都是大写字母开头,后面的每个单词首字母大写,其它字母小写,如果有一部分是缩写,如"HTML"、"URL"等等,则全部大写
      

  3.   

    private Component CreateToolbar()这句话不知道你是什么意思?还有就是try要和catch一起使用不能单个出来
    string STR 没有被初始化,不存在吧 ?
      

  4.   

     private Component CreateToolbar() {   ......   } 这个不能是PRIVATE的 
      

  5.   

    包名小写
    类名首字母大小
    变量全部要小写
    而且str 局部变量要对它初始化的
    try{}catch(){}要捕获的
     private Component CreateToolbar() {   ......   } 
     上面这句是什么意思?内部类的话 怎么能有括号? 而且类也不能用private来修饰
      

  6.   

    1、包名
    2、类名
    3、赋值语句 空格
    4、try catch 成对
    5、方法名
    6、代码对齐方式找本规范 稍微看下