Advertisement
Guest User

Spellcheck Error

a guest
Mar 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import java.io.File;
  2. import java.util.Scanner;
  3.  
  4. public class Question5 {
  5. public static void main(String[] args) {
  6. Scanner keyboard = new Scanner(System.in);
  7. {
  8. System.out.println("Enter word to spellcheck (or exit to end)");
  9. String word = keyboard.nextLine();
  10.  
  11. File file = new File(word);
  12. do {
  13. System.out.println(word + " is spelled correctly.");
  14. System.out.println("Enter word to spellcheck (or exit to end)");
  15. word = keyboard.nextLine();
  16. }while (!word.equals("exit"));
  17. if (word.equals("exit"))
  18. {
  19. System.out.println("Ending program...");
  20. }
  21. }
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement