long类型数据百分比

public void test(){
        long l = 1l;
        long l1=2l;
        int i;
        System.out.println(((Long) l).doubleValue()+"------------------------");
        DecimalFormat df = new DecimalFormat("0%");
        String format = df.format( (((Long) l).intValue()/ ((Long) l1).doubleValue()));
        System.out.println(format);

       
    }

  

posted @ 2022-03-25 21:41  每天--自然醒  阅读(249)  评论(0)    收藏  举报