In the method getString() You are creating a new File(), which throws FileNotFoundException. This FileNotFoundException must be caught by enclosing the scanner code block with in the try-catch block or declared thrown by the method. Same thing applies to the putString (String finalString) method.
Your code should be
static String getString(){
Scanner input;
try {
input = new Scanner(new File(" "));
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String codeString = input.next();
return codeString;
}
static void putString (String finalString){
PrintWriter work;
try {
work = new PrintWriter("EncryptedDocument.txt");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
work.print(finalString + " ");
work.close();
}