Java NumberFormatException usually occurs when you try to do something like convert a String to a numeric value, like an int, float, double, long, etc.
The best way to show a NumberFormatException is by example, so here's an example where I intentionally write bad Java code to throw a NumberFormatException
So, a NumberFormatException is an Exception that might be thrown when you try to convert a String into a number, where that number might be an int, a float, or any other Java numeric type.