public class TestElseif {
public static void main(String args[]){
int i=7;
/*
* test if else-if
*/
if(i<9)
System.out.println("do run this step1");
else if(i==7)
System.out.println("do run this step"); //donot run this step
/*
* test if
*/
int j=0;
String str="[0-1]";
String str1="[0-9]";
if(String.valueOf(j).matches(str1))
System.out.println("do run here"); //这两个都运行了,
if(String.valueOf(j).matches(str))
System.out.println("do run here"); //