Home Compare Image Size in KB in Java
 I am using an api which gives me the size of an image, such as 200KB (can be MBs also). Now I need to perform some action on images below a specific size. What I am trying to achieve is something like this: String imgSize = img.getSize(); if(imgSize < 250KB) { // Do Something }  I can't use the relational operator here. What could be the best way to achieve this?