/* package whatever; // don't place package name! */
import java.util.* ;
import java.lang.* ;
import java.io.* ;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
byte b1= 1 ,b2= 2 ,b3,b6;
final byte b4= 100 ,b5= 100 ;
b6= b4+ b5; // line3 error: incompatible types: possible lossy conversion from int to byte
b3= b1+ b2; // line4 error: incompatible types: possible lossy conversion from int to byte
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWJ5dGUgYjE9MSxiMj0yLGIzLGI2OyAKCQlmaW5hbCBieXRlIGI0PTEwMCxiNT0xMDA7IAoJCWI2PWI0K2I1OyAgLy8gbGluZTMgZXJyb3I6IGluY29tcGF0aWJsZSB0eXBlczogcG9zc2libGUgbG9zc3kgY29udmVyc2lvbiBmcm9tIGludCB0byBieXRlCgkJYjM9YjErYjI7ICAvLyBsaW5lNCBlcnJvcjogaW5jb21wYXRpYmxlIHR5cGVzOiBwb3NzaWJsZSBsb3NzeSBjb252ZXJzaW9uIGZyb20gaW50IHRvIGJ5dGUKCQlTeXN0ZW0ub3V0LnByaW50bG4oYjMrYjYpOwoJfQp9
compilation info
Main.java:14: error: incompatible types: possible lossy conversion from int to byte
b6=b4+b5; // line3 error: incompatible types: possible lossy conversion from int to byte
^
Main.java:15: error: incompatible types: possible lossy conversion from int to byte
b3=b1+b2; // line4 error: incompatible types: possible lossy conversion from int to byte
^
2 errors
stdout