How to fix this error: Exception in thread "main" q. Exit java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "action" is null at AddressBook.main(AddressBook.java:23) import java.util.Scanner; public class AddressBook { public static void main(String[] args) { Tablea addressBook = new Tablea(); Scanner scanner = new Scanner(System.in); String name, address; String action = null; boolean moreEntries = true; while (moreEntries) { System.out.println("/nMenu"); System.out.println("n.Add Entry"); System.out.println("d. Delete Entry"); System.out.println("u. Update Entry"); System.out.println("l. Search"); System.out.println("a. View All"); System.out.println("q. Exit"); // Insert a new entry into the address book switch (action) { case "n": System.out.print("Enter a name: "); name = scanner.nextLine(); System.out.print("Enter an address: "); address = scanner.nextLine(); addressBook.insert(name, address); System.out.println("New Contact has been added,"); System.out.print("Add another entry? (y/n): "); String answer = scanner.nextLine().toLowerCase(); moreEntries = answer.equals("y") || answer.equals("yes"); break; // Delete an entry from the address book case "d": System.out.println("Enter a name to delete: "); name = scanner.nextLine(); boolean deleted = addressBook.delete(name); if (deleted) { System.out.println("Address deleted"); } else { System.out.println("Name not found"); } break; // Update an entry in the address book case "u": System.out.print("Enter a name to update: "); name = scanner.nextLine(); System.out.print("Enter a new address: "); address = scanner.nextLine(); boolean updated = addressBook.update(name, address); if (updated) { System.out.println("Address updated"); } else { System.out.println("Name not found"); } break; // Lookup an entry in the address book case "l": System.out.print("Enter a name to look up: "); name = scanner.nextLine(); String result = addressBook.lookUp(name); if (result != null) { System.out.println("Address: " + result); } else { System.out.println("Name not found"); } break; // Display all entries in the address book case "a": System.out.println("All entries:"); addressBook.displayAll(); break; // Quit the program case"q": System.out.println("Quitting..."); } } } } OTHER FILES THAT GO WITH THIS public class Node { private String name; private String address; private Node next; Node() { // add here .. } Node(String name, String address) { // add here .. this.name = name; this.address = address; this.next = null; } public String getKey() { // add here .. return this.name; } public void setKey(String name) { // add here .. this.name = name; } public String getValue() { // add here .. return this.address; } public void setValue(String address) { // add here .. this.address = address; } public Node getNext() { // add here .. return this.next; } public void setNext(Node next) { // add here .. this.next = next; } } import java.util.Scanner; public class Tablea { private Node mark; publi.