Home  >  Article  >  Java  >  for input string: Why does it appear?

for input string: Why does it appear?

藏色散人
藏色散人Original
2020-05-11 09:19:0251390browse

for input string: Why does it appear?

for input string: What is the reason?

"for input string:" error detailed error The information is "java.lang.NumberFormatException: For input string:" exception;

This exception is due to a formatting exception thrown when converting a string that does not conform to the number format into a number;

Solution:

1. If there is an exception during debugging, use debug or print statements to output the variables and correct the string to numeric format;

2. If there is an exception during runtime, please use try catch statement capture;

Related recommendations: "java learning"

The above is the detailed content of for input string: Why does it appear?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn