Quick actions

cmd+k|ctrl+k

Navigation

Languages

java-if-else-switch3

Snippet info

Language

Java

Visibility

public

Author

w3xue

Created

2023-01-06T07:59:25.590136Z

Updated

2023-01-06T07:59:31.682178Z

public class Test {
   public static void main(String args[]){
      int x = 30;
 
      if( x == 10 ){
         System.out.print("Value of X is 10");
      }else if( x == 20 ){
         System.out.print("Value of X is 20");
      }else if( x == 30 ){
         System.out.print("Value of X is 30");
      }else{
         System.out.print("这是 else 语句");
      }
   }
}
INFO