Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio is drunk? [closed]

Recently Android Studio went completely insane by doing completely illogical stuff. Look at the prints in the console:

I/System.out: 0 + 518 < 518 is true

I/System.out: 518 + 518 < 518 is true

then look at the code:

System.out.print(j + " + " + squareSize + " < " + squareWidth);

if (j + squareSize < screenSizeY) {
    squareHeight = squareSize;
    System.out.print(" is true");
} else {
    squareHeight = screenSizeY - j;
    System.out.print(" is false");
}

There are no other Threads that might change these variables. Did I oversee something obvious or did Android Studio just drink too much last night?

like image 774
Alex H. Avatar asked Jun 07 '26 01:06

Alex H.


1 Answers

Look at these two lines:

(j + " + " + squareSize + " < " + squareWidth)

and

if (j + squareSize < screenSizeY)

if squareWidth is equal with screenSizeY then AS is drunk, else it is not :)

like image 182
pleft Avatar answered Jun 09 '26 14:06

pleft