Java Tutorials. Detailed Explanations. Complete Examples.
2024-08-21
Using AWS Elastic Container Service Fargate to run docker image with a Spring Boot application.
2024-07-04
Complete tutorial of building Spring Boot REST API using Redis with transaction.
2024-07-03
Complete tutorial of building Spring Boot REST API using Redis.
2024-07-02
Complete tutorial of building Spring Boot REST API with Hibernate and Spring Data JPA.
2024-07-01
Complete tutorial of building Spring Boot REST API with Hibernate and JPA Entity Manager.
2024-06-30
Complete tutorial of building Spring Boot REST API with Hibernate only.
2024-06-29
Complete tutorial of creating RESTful API with Spring Boot.
2024-06-28
Use annotation to define constraints on Spring REST API request payloads to return error message if any of the constraints is violated.
2024-06-27
Spring Authentication allows us to identify who is trying to access the resource while Spring Authorization allows us to determine who is allowed to access the resource.
2024-06-25
Complete tutorial of building Spring REST API with Hibernate and JPA using Second Level Cache showing Hit and Miss.
2024-06-25
Complete tutorial of building Spring REST API application with Hibernate and JPA using Second Level Cache.
2024-06-24
Complete tutorial of building Spring REST API with Hibernate using Second Level Cache showing Hit and Miss.
2024-06-22
Complete tutorial of building Spring REST API with Hibernate Second Level Cache.
2024-06-18
Complete tutorial of building Spring REST API with Hibernate and JPA.
2024-06-17
Complete tutorial of building Spring REST API with Hibernate only.
2024-06-16
Complete tutorial of creating RESTful API with Spring.
2024-06-15
Complete tutorial of building Spring REST API with Elastic Search.
2024-06-08
Complete tutorial of building Spring REST API with MongoDB using Spring Data.
2024-06-07
Complete tutorial of building Spring REST API with MongoDB using MongoClient.
2024-06-04
Complete tutorial of building Spring REST API with Cassandra using Spring Data.
2024-06-02
Complete tutorial of building Spring REST API with Cassandra using Datastax Mapper.
2024-06-01
Complete tutorial of building Spring REST API with Cassandra using Datastax.
2024-04-01
To deserialize a JSON string to a Java object, we could use the FasterXML Jackson library.
2023-11-14
See this tutorial of creating a Java websocket server and a Java websocket client.
2023-09-10
Since Java 9, Java release a feature called Module. Module allows a jar to declare availability of packages and its dependencies of packages from other jars, thus reduce the chance of ClassNotFoundException and increase encapsulation.
2023-03-10
Jersey uses HK2 which is a lightweight framework to provide Inversion of Control and Dependency Injection.
2023-02-12
Complete tutorial of creating basic web service with Jersey.
2022-12-18
Exclude a particular class from a jar inside a war file using Gradle. This could be due to multiple versions of a library are included and we want to avoid the application to load the unwanted version but we don't want to exclude the whole jar.
2022-12-08
Exclude a particular class from a jar inside a war file using Maven. This could be due to multiple versions of a library are included and we want to avoid the application to load the unwanted version but we don't want to exclude the whole jar.
2022-07-30
Quicksort is a fast sorting algorithm, see the implementation in Java.
2022-07-20
Mergesort is a fast sorting algorithm, see the implementation in Java.
2022-06-11
To apply a logic globally before hitting the resource, an implementation of ContainerRequestFilter could be used.
2022-05-01
Jersey web service could use MessageBodyReader to deserialize JSON to Java object and MessageBodyWriter to serialize Java object back to JSON.
2022-03-30
Java annotation can be used to modify the behavior of a class, method or variable.
2022-02-25
In Java, for a method to accept any number(including zero) of arguments, we can use varargs which has the format myMethod(myType ... myArgumentName).
2022-02-02
Threads in Java runs independently. To synchronize between threads we could use the wait() and notify() function.
2022-01-28
There are 2 ways to create a thread. One is to extend the Thread class overriding the run() method. The other is to implement the Runnable interface also overriding the run() method.
2022-01-08
We could convert a date or time to a specific string format, and/or change the timezone, by using SimpleDateFormat.
2021-12-28
Using parallel stream allow running code in deparallel in a relatively simply way.
2021-11-14
We could use reflection to modify a field or call a method which is private of a class.
2021-11-14
Java Immutable class is, once the object is initiated, none of the fields can have its value changed.
2021-10-14
In Java, all the class are extending from the Object class and so inherited the equals and hashCode method. The equals method is used to determine whether 2 objects are the same, while hashCode is used to determine which bucket to put the object if hashing structure is used.
2021-09-30
In Java, Functional Interface is an interface with just one non-static abstract method, with an annotation @FunctionalInterface.
2021-09-20
If multiple threads are operating on a shared variable at the same time, and the operations are not atomic, the result would be unpredictable. In order to solve this problem, we could put synchronized blocks around the operations, to make sure only at most one thread could operate on the variable at one time.
2021-08-06
Both Comparable and Comparator can be used to compare the elements of the list, which allows you to sort the list with your own logic.
2021-08-06
The difference between checked and unchecked exception is that unchecked exception will not cause compile error even though it is not caught or not declared to be thrown.
2021-07-18
In a RESTful Spring Web Service, we can use FasterXML Jackson to serialize Java object back to JSON response.
2021-07-18
In a RESTful Spring Web Service, we can use FasterXML Jackson to deserialize JSON request to Java object.
2021-06-30
To serialize a Java object to a JSON string, we could use the FasterXML Jackson library.
Top 10 tutorials: