@Test public void testGetXpForLevel() { int xp = Experience.getXpForLevel(99); Assert.assertEquals(XP_FOR_99, xp); xp = Experience.getXpForLevel(126); Assert.assertEquals(XP_FOR_126, xp); xp = Experience.getXpForLevel(1); Assert.assertEquals(0, xp); }
public static int getXpForLevel(int level) { if (level < 1 || level > MAX_VIRT_LEVEL) { throw new IllegalArgumentException(level + " is not a valid level"); } return XP_FOR_LEVEL[level - 1]; }
Experience { public static int getXpForLevel(int level) { if (level < 1 || level > MAX_VIRT_LEVEL) { throw new IllegalArgumentException(level + " is not a valid level"); } return XP_FOR_LEVEL[level - 1]; } }
Experience { public static int getXpForLevel(int level) { if (level < 1 || level > MAX_VIRT_LEVEL) { throw new IllegalArgumentException(level + " is not a valid level"); } return XP_FOR_LEVEL[level - 1]; }  }
Experience { public static int getXpForLevel(int level) { if (level < 1 || level > MAX_VIRT_LEVEL) { throw new IllegalArgumentException(level + " is not a valid level"); } return XP_FOR_LEVEL[level - 1]; }  static int getXpForLevel(int level); static int getLevelForXp(int xp); static double getCombatLevelPrecise(int attackLevel, int strengthLevel,
		int defenceLevel, int hitpointsLevel, int magicLevel,
		int rangeLevel, int prayerLevel); static int getCombatLevel(int attackLevel, int strengthLevel,
		int defenceLevel, int hitpointsLevel, int magicLevel,
		int rangeLevel, int prayerLevel); }
Experience { public static int getXpForLevel(int level) { if (level < 1 || level > MAX_VIRT_LEVEL) { throw new IllegalArgumentException(level + " is not a valid level"); } return XP_FOR_LEVEL[level - 1]; }  static int getXpForLevel(int level); static int getLevelForXp(int xp); static double getCombatLevelPrecise(int attackLevel, int strengthLevel,
		int defenceLevel, int hitpointsLevel, int magicLevel,
		int rangeLevel, int prayerLevel); static int getCombatLevel(int attackLevel, int strengthLevel,
		int defenceLevel, int hitpointsLevel, int magicLevel,
		int rangeLevel, int prayerLevel); static final int MAX_VIRT_LEVEL; }