class Demo 
{ 
        public static void main(String[] args) 
        { 
                int month=52; 
                   
                  if(month>=1&&month<=6) 
                 { 
                           System.out.println("上半年"); 
                           //System.exit(0);   //终止 
                  } 
                 else if(month>=7&&month<=12) 
                 { 
                           System.out.println("下半年"); 
                 } 
                 else 
                         System.exit(0);//此语句终止虚拟机进行,此语句以下的部分将不会被执行 
                System.out.println("over"); 
        } 
} 
 |   
        
 
    
    
    
     
 
 |