You are viewing a single comment's thread. Return to all comments →
Mine is much simpler. I just print the string literally without throwing any exception XD. Because it doesn't make sense to throw an exception on a static block. It should be either in the constructor or in a method.
I'm already an experienced developer and I found this while looking places to practice my coding skills. These challenges are too easy for me XD. But they are good to remember the basics.
I've been coding in Python for a year or so. During this period I almost didn't touched Java. That's why I wanted to practice it a little bit.
Sorry, this went totally out of topic... I just felt I had to say it.
Can you please send me the link where I can learn about throwing exception in static block is no good..