Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

 

and many more ....

 

 

SLF4J Logging Levels Example

This post is about the various logging levels available in SLF4J and how to extend it with Marker interface. This post utilizes Logback as the logging implementation for our examples. 1. SLF4J Tutorial – Introduction Before jumping into SLF4J, we will take a short look at the reason for its existence. Logging is an important aspect of any application. It ...

Read More »

Hibernate Merge Example

In hibernate; both merge() and update() methods updates an entity and can also affect the state of an object i.e. from detached to persistent. In this tutorial, we will explore the use of merge() method. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ...

Read More »

Hibernate Enum Type Mapping Example

In hibernate; developers can map the Java Enum type to a column in the database. In this tutorial, we will explore how a Java Enum type is stored in the database. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides ...

Read More »

MySQL Triggers Tutorial

1. Introduction In this post, we feature a comprehensive Tutorial on MySQL Triggers and how do they work. MySQL is one of the most used SQL databases in many of the world-enterprise applications due to its ability to manage transactions and the ACID-behaviour which is built into its core. One of the reasons MySQL is so popular is due to the easiness ...

Read More »

Java Observer Design Pattern Example

1. Introduction In this article, we would discuss one of the numerous Java Design Patterns – The Java Observer Design pattern which is being used popularly in a variety of messaging and notification frameworks. The Observer design pattern is a typical way of managing communication between multiple classes. This pattern helps in organising the code in a way that makes ...

Read More »

Java 8 Add Days to Current Date Example

1. Introduction Java 8 added a new set of packages to provide a comprehensive date-time model. Java 8 Date-Time API is a JSR-310 implementation. In this example, I will use classes from the java.time and java.time.format packages to demonstrate how to add days to the current date. java.time is the base package which includes a set of date-time classes: LocalDate, LocalDateTime, Instant, Period, Duration, Clock, ZonedDateTime, ...

Read More »

Hibernate Persist Example

In hibernate; an entity or a record can be saved in a database using the save(), persist(), or the saveOrUpdate() method. In this tutorial, will explore the use of persist() method to commit an entity to the database. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate ...

Read More »

Hibernate @NamedQuery Annotation Example

In hibernate; developers can create the Named Queries that is a group of query statements. This tutorial will explore the use of @NamedQueries annotation in the hibernate framework. 1. Introduction Object-Relational Mapping or ORM is the programming technique to map application domain model objects to the relational database tables Hibernate is a Java-based ORM tool that provides the framework for ...

Read More »

Spring static factory-method Example

In spring, developers can create a bean (or the object instantiation) by invoking the static-factory-method. This tutorial will explore the use of factory-method attribute in the spring configuration file. The factory-method attribute is used when the factory-method is static in nature 1. Introduction Spring is an open-source framework created to address the complexity of an enterprise application development One of ...

Read More »

Java 8 Join Arrays Example

1. Introduction An Array is a data structure which holds a fixed number of objects with the same type. Joining Arrays is to combine two arrays into one. Java 8 enhances Collection by providing a new Stream interface. A stream is not a data structure, instead it is created from Collection, Array, or I/O channels. Java 8 provides a Stream interface which contains several methods ...

Read More »