JavaSERelevant topics

Class initialization in Java

by:

Class initialization means initializing all static members of the class. Class in Java is initialized when : An instance of the class is created using either …

JavaSERelevant topics

Class Loaders in Java

by:

Methods of Java.lang.ClassLoader : public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException : this method is used to load the classes which are referenced by the …

FrameworksRelevant topicsSpring

@RequestBody and @ResponseBody annotations

by:

When using @ResponseBody annotation, developer is still able to explicitly set the content type that the method returns (JSON is used as a content type by …

FrameworksRelevant topicsSpring

CommandLineRunner and ApplicationRunner interfaces

by:

Spring Boot provides two interfaces to run specific pieces of code when an application is fully started. These interfaces get called just before run() once SpringApplication …

Build ToolsMavenOtherRelevant topics

Maven Dependency Scopes

by:

Let’s observe maven dependency scope differences in detail. For instance, runtime is useful for dependencies required for unit tests and runtime, but not at compile time. …

FrameworksRelevant topicsSpring

Building an Application with Spring Boot

by:

For instance, let’s create a simple Web Application. Controller code is shown below: The class is flagged as a @RestController, meaning it is ready for use …

FrameworksRelevant topicsSpring

Spring Boot Tutorial

by:

Spring Boot favours convention over configuration and is designed to get developer running application as quickly as possible. Spring Boot uses completely new way of Java …

JavaSERelevant topics

Guide to Java 8 Optional

by:

Optional class was introduced in Java 8. The purpose of using the class is to provide a type-level solution for representing Optional values instead of null …

JavaSERelevant topics

About generics

by:

Arrays in Java have always been type-safe : for example, an Array declared as type String (String ) cannot accept Integers (or ints) or anything other …

JavaSERelevant topics

About enum

by:

As of Java 5, Java lets developers restrict a variable to having one of only a few predefined values – in other words, one value of …