Advertisement
Guest User

Untitled

a guest
Oct 21st, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public class Page {
  2.  
  3.     public LocalPerk[] entrys = new LocalPerk[15];
  4.     public boolean addEntry(LocalPerk e){
  5.         //Itterate through the array
  6.         //Insert the entry at the first empty spot
  7.         //Do somthing if full
  8.         for (int i = 0; i < 15; i++){
  9.             if (entrys[i] == null)
  10.             {
  11.                 entrys[i] = e;
  12.                 break;
  13.             }
  14.         }
  15.         return (entrys[14] != null) ? true : false;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement