How does Double.parseDouble() handle invalid String inputs?
If the String passed to Double.parseDouble() cannot be parsed into a valid double (e.g., contains non-numeric characters), it throws a NumberFormatException. This exception occurs when the string contains non-numeric characters.