79128506

Date: 2024-10-26 12:19:19
Score: 2
Natty:
Report link

Also, this exception occurs when your val is not an integer, in the question case this is not an issue, but just answering for other people's help.

String val = "100"; String.format("%3d", val);

To resolve make sure you parse String to int.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Priyanshi Pandya