Skip to main content

Java


  • LiveReload server: To save the time wasted in refreshing the browser after every code change, Spring Boot comes with a LiveReload embedded server that triggers an automatic browser refresh. The LiveReload extensions are available for different browsers. Once installed and enabled, any change in the code is detected by the LiveReload server and the browser is automatically refreshed to reflect the change.
  • Actuator: Spring Boot Actuator is a feature that provides monitoring features for the application during development and after deployment. It provides metadata about the application like the beans configured, how autoconfiguration has worked, how many times a specific service is called, how many times a specific service has failed, etc.
  • Runtime exceptions are referred to as unchecked exceptions. All other exceptions are checked exceptions
  • The fact that you are handling an exception does not make it a Checked Exception if it is a RuntimeException
  • Checked Exceptions: A checked exception must be caught somewhere in your code. If you invoke a method that throws a checked exception but you don't catch the checked exception somewhere, your code will not compile. That's why they're called checked exceptions: the compiler checks to make sure that they're handled or declared.
  • always declare the most precise exception possible, or a list of such. The exceptions you declare your method as capable of throwing are a part of the contract between your method and the caller. Throwing "FileNotFoundException" means that it is possible the file name isn't valid and the file will not be found; the caller will need to handle that intelligently. Throwing Exception means "Hey, sh*t happens. Deal." Which is a very poor API.
  • Java is always pass-by-value. 



Comments

Popular posts from this blog

The Great Minds

🔬 Science & Philosophy Carl Sagan – astrophysicist, science communicator ( Cosmos ). Richard Dawkins – evolutionary biologist ( The Selfish Gene ). Neil deGrasse Tyson – astrophysicist, communicator ( Astrophysics for People in a Hurry ). Brian Cox – physicist, popular science communicator. 💰 Business, Investing & Strategy Warren Buffett – value investing, Berkshire Hathaway. Charlie Munger – Buffett’s partner, multidisciplinary wisdom. Naval Ravikant – angel investor, modern philosopher ( The Almanack of Naval Ravikant ). Peter Lynch – legendary investor ( One Up on Wall Street ). Steve Jobs – Apple co-founder, master of design and vision. Elon Musk – Tesla, SpaceX, futurist entrepreneur. Richard Dawkins

The Paradox of Abundance

Why having more can make you weaker — and having less can make you stronger.