Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import java.util.Scanner;
- public class Question5 {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- {
- System.out.println("Enter word to spellcheck (or exit to end)");
- String word = keyboard.nextLine();
- File file = new File(word);
- do {
- System.out.println(word + " is spelled correctly.");
- System.out.println("Enter word to spellcheck (or exit to end)");
- word = keyboard.nextLine();
- }while (!word.equals("exit"));
- if (word.equals("exit"))
- {
- System.out.println("Ending program...");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement