java常用数据类型总结

基本数据类型

int

long

float

double

boolean

char

final double PI = 3.1415927;   声明常量

double[] myList = new double[size];   创建一个数组

遍历数组:

for(type element: array)
{
    System.out.println(element);
}

for (int i = 1; i < myList.length; i++)

{

System.out.println(myList[i]);

}

 ArrayList<ArrayList<Double>> data;  声明


Set<Cluster> clusterSet2;


ArrayList<float[]> Sim_In;


ArrayList<Double> sum = new ArrayList<Double>();


 List<Integer> jishu = new ArrayList<Integer>();


ArrayList<Double> sum2 = new ArrayList<Double>();


ArrayList<ArrayList<Double>> Sim_On=new ArrayList<ArrayList<Double>>();


ArrayList<float[]> Sim_All;


DistanceCompute disC2 = new DistanceCompute();

Vector 可实现自动增长的对象数组。 
java.util.vector提供了向量类(Vector)以实现类似动态数组的功能。 

   Vector<String> hs = new Vector<String>();
        hs.add("aa");
循环vector
 public void printSet(List hs) {
        Iterator iterator = hs.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值