Help in case code is running in local IDE but not on upGrad's coding console.
Help in case code is running in local IDE but not on upGrad's coding console.
Some of the most common reasons why this may happen are:
In Java, the class name should be “Source”, if you copy paste any code with any other classname it will not work.
Check if you are providing appropriate input to the code using the input tab if you get anerror on pressing the “Run Code”.
If you are still getting an error, try to find out the reason such error occurs and then work on debugging the code. It can be simple case of an extra “}”, “;” or any other character.