We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Static Initializer Block
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.