daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest May 14th, 2012 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static boolean year(int name) throws Exception
  2.     {
  3.         String location="Student"+"/"+name;
  4.         boolean result;
  5.         java.io.File file = new java.io.File(location);
  6.         Scanner output = new Scanner(file);
  7.         for(int i=1;i<=2;i++)
  8.         {
  9.            
  10.             if (i==2 && output.nextInt()==1)
  11.             {
  12.                 result = true;
  13.                 break;
  14.             }
  15.             else if (i==2 && output.nextInt()>=2)
  16.             {
  17.                 result=false;
  18.                 break;
  19.             }
  20.         }
  21.         return result;
  22. }
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top