I have a script to ask myself words. I hit the Design button in Eclipse and this happens to me- link .
Show Stack Trace: link link link link link
This is the script:
import java.util.Scanner;
public class WoordjesLeren {
public static void main(String[] args) {
Scanner wordL= new Scanner(System.in);
Scanner wordR = new Scanner(System.in);
Scanner answer= new Scanner(System.in);
System.out.println("Word:");
String wordL1= wordL.nextLine();
System.out.println("Translation:");
String wordR1= wordR.nextLine();
System.out.println("Word:");
String wordL2= wordL.nextLine();
System.out.println("Translation:");
String wordR2= wordR.nextLine();
System.out.println("Word:");
String wordL3= wordL.nextLine();
System.out.println("Translation:");
String wordR3= wordR.nextLine();
System.out.println("Word:");
String wordL4= wordL.nextLine();
System.out.println("Translation:");
String wordR4= wordR.nextLine();
System.out.println(wordL2 + " -> ");
String answer2= answer.nextLine();
if (answer2.equals(wordR2)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println(wordL3 + " -> ");
String answer3= answer.nextLine();
if (answer3.equals(wordR3)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println(wordL4 + " -> ");
String answer4= answer.nextLine();
if (answer4.equals(wordR4)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println(wordL1 + " -> ");
String answer1= answer.nextLine();
if (answer1.equals(wordR1)){
System.out.println("Your answer is correct.");
}else{
System.out.println("Your answer is incorrect.");
}
System.out.println("This was the exam, well done.");
}
}