有趣的问题:
如果更改语句并打印出“ 你好世界”
public static void main(String[] args) {
if(){
System.out.println("Hello");
}else{
System.out.println("World");
}
}
My solution is to add "!System.out.println("Hello")" in the if statement,But it doesn t work, any ideas?
public static void main(String[] args) {
if(!System.out.println("Hello")){
System.out.println("Hello");
}else{
System.out.println("World");
}
}
UPDATE: I think this works:
public static void main(String args[]) {
if(System.out.append("Hello ")==null){
System.out.print("Hello ");
}else{
System.out.println("World");
}
}
C:
main()
{ if(printf("Hello"),0)
printf("Hello");
else
printf(" world!
");
getch();
}