public class TextIf {
     public static void main(String[] args) {
       int i = 10;
       if(i < 10){
       System.out.println("error");
       }  //这里一定要注意不要忘记关闭右大括号.成对出现.好的变成习惯
       else if(i > 10){
       System.out.println("error");
       }
       else if(i == 10){
       System.out.println("hello,if");
       }
       else
       //System.out.println("error"); //如果这个没有被注释的话程序只能输出一个"error"
   //如果需要两个都输出需要加"{}"不加的话可能会出现莫名其妙的错误.javac不会提示错误的
       System.out.println("error"); //单行输出可以不需要"{}"
     }
 
}
 
有不对的地方欢迎大家指正!