Syntax error on tokens, ; expected?
<p>I commented all my errors in my program. The point of my program is to shift my input file by 
whatever the user inputs. My errors that I commented out are kind of pointless to me because it all make sense and the computer is not reading it the way I want it to. Not to be confused with one of the errors that I commented one of the tokens is ",". The others are "(", and ")". These all are errors that expect a semi colon somewhere in the line where I commented them.</p>

<p>Here is what the program looks like:</p>

<pre><code>import java.util.*;
import java.io.*;

class CaesarCipher
{
 public static void main (String [] args) throws FileNotFoundException
 {
  Scanner keyboard = new Scanner(System.in);
  System.out.println("What shift should I use? ");
  int shift = keyboard.nextInt();
  System.out.println("What is the name of the input file? ");
  String name = keyboard.next();
  File f = new File(name);
  Scanner inFile = new Scanner(f);
  System.out.println("What is the name of the output file? ");
  String text = keyboard.nextLine();
  PrintWriter outFile = new PrintWriter(text);
  String encrypted = "";

  while (inFile.hasNextLine())
  {
     String line = inFile.nextLine();
      if ( shift == 1)
     encrypted = caesarEncipher(line, shift);
      else if (shift == 2)
     encrypted = caesarDecipher(line, shift);// the method caesarDecipher(java.lang.String, int) is undefined for the type CaesarCipher
      System.out.println(encrypted);
      outFile.println(encrypted);
  }
 }
  static String caesarEncipher(String text ,int shift) throws FileNotFoundException
  {
   String t = "";
   int i = 0;
   while (i &lt; t.length())
   {  
    if (shift &lt; 0)
    {
        shift = (shift % 26) + 26;
     }
        int move = (char) ((text.charAt(0) - 'A' + shift) % 26 + 'A');
        t += move;
        i++;
        System.out.println(t);
        outFile.println(t);
        return "DONE!";
     }
                                                          // for each token listed, it expects the semi colon.
     static String caesarDecipher(String text, int shift) throws FileNotFoundException // Syntax error on token "(", "," , ")", ; expected      
     {
      return caesarEncipher(input, -shift);
      }
     }
    }
</code></pre>
