+ 3
What is difference between this two codes?
I have write this 2 codes 1st code output is --No Output And other is error https://code.sololearn.com/cggxUJsY9max/?ref=app https://code.sololearn.com/cGIQhAfN1604/?ref=app https://www.sololearn.com/discuss/1743056/?ref=app
1 Answer
+ 3
Your first code doesn't produce output because the method printDate() is never called. The reason why the second code generates output (actually it doesn't, it just shows an error message because of the missing main() function) was already explained in the question you linked