Java examples for Language Basics:Variable
Creates several variables, assigns them initial values, and displays two of them as output.
public class Main { public static void main(String[] arguments) { final char UP = 'U'; byte initialLevel = 12; short location = 13250; int score = 35100; boolean newGame = true; System.out.println("Level: " + initialLevel); System.out.println("Up: " + UP); }//w w w . ja va2 s. co m }