The operator is undefined

前端 未结 3 1470
生来不讨喜
生来不讨喜 2020-12-17 03:47

I just tried to make a simple class that lets me figure out the length of a file:

public class Size {

    long s = 0;
    int a;

    public static void mai         


        
3条回答
  •  生来不讨喜
    2020-12-17 04:03

    Put a into an Integer object, which can be compared to null:

    Integer value = new Integer(a);
    
    while (value != null)
    {
        // Do stuff
    }
    

提交回复
热议问题