What is the difference between throw and throws?

Beginner

Answer

throw: Used to explicitly throw an exception from method or code block.
throws: Used in method signature to declare that method might throw certain exceptions.

public void validateAge(int age) throws IllegalArgumentException {
    if (age < 0) {
        throw new IllegalArgumentException("Age cannot be negative");
    }
}