This article demonstrates how to read files written in various logographic characters like Kanji (from Japan), Hanja (from Korea), and Hanzi (from China) using UTF-8 encoding.
Android greenDAO ORM For SQLite Example
This post shows how to use greenDAO ORM for SQLite in Android using a demo app. We start with a simple Android project in the Android Studio, create a few entities, save to and read data from the database. Requirements
Execute specific unit test in Maven using Eclipse
Okay, your project has hundreds of unit tests, but you only need to execute one or perhaps only all tests from a JUnit test file. Maven allows for that, and Eclipse makes it more convenient. Eclipse JUnit Run Configuration With
Spring Dependency Injection Examples Without Spring Boot
The Spring Framework has come a long way. Nowadays, it is way easier to start a Java project with the Spring Framework using Spring Boot. In the past, we used to download Spring individual jar files and configure the dependencies
Java Null Pointer Exception Processing With Try-Catch
In Java, we can handle exceptional events using the try-catch. But not all exceptions are the same. Java Null Pointer Exception processing requires using try-catch in a way that is unchecked during compilation. Checked And Unchecked Java Exceptions We refer
JUnit 4 – Run Test Method More than Once
This post demonstrates how to perform repeated tests in JUnit 4 for this post. It involves creating a class that implements the TestRule interface, another class that implements Statement interface and a new annotation.
Using Spring Retry API
Did a method just throw an Exception? Well, we could re-invoke it a few times more before giving up using Spring’s Retry API. Last time we touched on BackOff and related interfaces and classes which is used in this API.
Limit Depth of Inheritance in Java
[wp_ad_camp_5] This post demonstrates how to limit the depth of Inheritance in your codes. We will use a class InheritanceUtils from Apache Commons Lang. Inheritance is Evil Yes, inheritance is evil. If we subclass too much in our code base,
Sort Lists in Java 8 using Comparator
This post demonstrates how to use Java 8 Comparator by examples.
More Elegant way to Retry Operations in Java using Spring
This post talks about a better way to retry failed operations in Java using classes in Spring.