long l = ((File)localObject).length();
if (l >= 1024L)
{
if (l >= 1048576L)
{
if (l >= 1073741824L)
str = Float.toString(Math.round(100.0F * ((float)l / 1.073742E+09F)) / 100.0F) + " GB";
else
str = Float.toString(Math.round(100.0F * ((float)str / 1048576.0F)) / 100.0F) + " MB";
}
else
str = Float.toString(Math.round(100.0F * ((float)str / 1024.0F)) / 100.0F) + " KB";
}
else
str = Long.toString(str) + " B";
else
str = Long.toOctalString(str) + ” B”;
}
return (String)str;
}
Another error in 16 th
Here i got the error in 9 th line and 12 th line Cannot cast from String to float in java
Looks like you are trying to cast the String
strto a float. Probably you have a mistake and you are supposed to use thelvariable instead.