A NoSuchMethodError is thrown when a program tries to call a method that does not exist in the class or interface.