1.Array类
package bilibili.chapter14;
import java.util.Arrays;
public class test {
public static void main(String []args){
int []arr = {3,4,5,2,1};
System.out.println(Arrays.toString(arr));
Arrays.sort(arr);
System.out.println(Arrays.toString(arr));
System.out.println(Arrays.binarySearch(arr,4));
}
}
2.包装类
package bilibili.chapter14;
import java.util.Arrays;
public class test {
public static void main(String []args){
Integer i = Integer.valueOf("10");
//System.out.println(i);
String ii = Integer.toString(i);
int num = i.intValue();
System.out.println(num);
}
}
javabean里一般将基本数据类型变成包装类型属性,表中uid是自增的,默认值是null,使用包装类型的话,插入语句可以是insert into user(uid,username,password) values (NULL,’金莲’,‘36666’);