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
"ABCNOTA NUMBER")? How can a cast work with bad data? Have you seen documentation or a tutorial that makes it look like this should work?str = Long.toString(l) + " B"