ArrayIndexOutOfBoundsException
Odavde mi je malo tesko da postujem na nastavu, pa cu biti
kratak... Pogledaj interfejs Comparable koji tvoja klasa treba da
implementira, jer da bi neke objekte mogao da stavljas u TreeMap moras da
mozes da ih poredis. Imas i drugi nacin, da nasledis klasu Comparator (iz
java.util.Comparator) ali to je cini mi se manje fleksibilno u tvom
slucaju.
Poz,
D.
kratak... Pogledaj interfejs Comparable koji tvoja klasa treba da
implementira, jer da bi neke objekte mogao da stavljas u TreeMap moras da
mozes da ih poredis. Imas i drugi nacin, da nasledis klasu Comparator (iz
java.util.Comparator) ali to je cini mi se manje fleksibilno u tvom
slucaju.
Poz,
D.
- Follow-Ups:
- Re: ArrayIndexOutOfBoundsException
- From: Dragan Milenkovic <tyrant@galeb.etf.bg.ac.yu>
- Re: ArrayIndexOutOfBoundsException
Previous by date: ArrayIndexOutOfBoundsException
Next by date: Re: ArrayIndexOutOfBoundsException
Previous by thread: Re: ArrayIndexOutOfBoundsException Next by thread: Re: ArrayIndexOutOfBoundsException
Previous by thread: Re: ArrayIndexOutOfBoundsException Next by thread: Re: ArrayIndexOutOfBoundsException