parse long to negative number

前端 未结 7 1561
北恋
北恋 2021-01-20 14:48

code:

public class Main{
    public static void main(String[] a){
        long t=24*1000*3600;
        System.out.println(t*25);
        System.out.println(2         


        
7条回答
  •  隐瞒了意图╮
    2021-01-20 15:28

    You should suffix the numbers with 'l'. Check the snippet below:

       public static void main(String[] a){
            long t=24*1000*3600;
            System.out.println(t*25);
            System.out.println(24l*1000l*3600l*25l);
        }
    

提交回复
热议问题