Advertisement
supernowlin

Treasure

Mar 26th, 2015
522
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 L09B
  2. {
  3.     public Treasure[] min(Treasure[] t1)
  4.     {
  5.         Treasure[] array = {};
  6.        
  7.         Treasure minValue = t1[0];
  8.        
  9.         for(int index = 0; index < t1.length; index++)
  10.         {
  11.             if (minValue < t1[index])
  12.             {
  13.                 minValue = t1[index];
  14.             }
  15.         }
  16.         return minValue;
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement