CVGalleryGamesPreviewRandomJavaSiteWeb
Site updates
Testing New System now...

Incompatible type for <thing>. Explicit cast needed to convert <type> to <another type>

short foo = 0;
short bar = 1;

foo = foo + bar; Although foo and bar are short, foo + bar gives an int

Although it is possible to convert between the two types used, Java needs to be told that you want to do it. The program could be rewritten like this:

short foo = 0;
short bar = 1;

foo = (short)(foo + bar);
NOTE: The Java section is mostly in maintenence mode. I don't have time to work on it right now. Errors will be corrected if pointed out, but they are not actively being searched for. Newer site features, like alternate stylesheets, may cause problems with these pages.