简单取最小值
import java.io.*;
class test
{
public static void main (String[] args) throws java.lang.Exception
{
Integer aa = 10;
Integer aa1 = 6;
Integer aa11 = 21;
Integer aa11111 = 11;
Integer aa111 = 4;
Integer aa1111 = 7;
if(aa>aa1){
aa=aa1;
}
if(aa>aa11){
aa=aa11;
}
if(aa>aa111){
aa=aa111;
}
if(aa>aa1111){
aa=aa1111;
}
if(aa>aa11111){
aa=aa11111;
}
System.out.println(aa);
}
}