[Bluej-discuss] Compile Error for correct code.
Namit TClaw
namit.tclaw at gmail.com
Tue Mar 7 07:34:21 GMT 2006
Hello, this is Namit here.
I am getting an error in the code here:
public class Test
{
public static void display()
{
byte b=50;
b=b*2;
System.out.println(b);
}
}
The Error shown is:possible loss of precision in the line:b=b*2;
A peculiar feature is that if I write : b*=2 , it works perfectly fine.
I don't know what is the reason for this. Can anyone explain why
it is happening???
Regards,
Namit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20060307/3e978b88/attachment-0001.html
More information about the bluej-discuss
mailing list