用if else 输出 hello world!!!

来源:互联网 发布:count 补0 sql 编辑:程序博客网 时间:2024/06/05 16:07

题目:

   if(条件){

        System.out.print("hello ");

    }else{

       System.out.print("world!!!");

   }

把条件补充完整  使之能打印出 hello world!!!                 (此题应该为智力题)

public class IfElse
{
 public static void main(String args[]){
    if(System.out.append("hello ")==null){
         System.out.print("hello ");

      }else{
         System.out.print("world");
    }
 }
}

 
原创粉丝点击