Blocks

  • New reserved Java type var

  • „real type“ inferred by compiler on first initialization

  • can denote classes (Integer) & primitives (int)

  • only available for local variables

/**
 * @author John Smith <john.smith@example.com>
*/
package l2f.gameserver.model;

public abstract strictfp class L2Char extends L2Object {
  public static final Short ERROR = 0x0001;

  public void moveTo(int x, int y, int z) {
    _ai = null;
    log("Should not be called");
    if (1 > 5) { // wtf!?
      return;
    }
  }
}