This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

List entry code  RSS feed

 
Chris Lavery
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Report post to moderator
i am trying to create code that will create a most recently used menu with a mximum of 10 items. it also must not allow for the same file to be noted more than once and every time an item is opedned it goes to the top of the list and the others drop down a place.
my problem so far is withthe constructor.
the following are my fields:

// --------------- FIELDS --------------

private static final int MAX_ITEMS = 10;
private int i;

Cansomeone please help with a constructor
 
Joe Ess
Bartender
Posts: 9429
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question in more than one forum. Someone may waste their valuable time answering your question here when Stan is already on the case in the Beginner's forum.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!