Java Check a String for Lowercase/Uppercase Letter, Special Character and Digit 1. Overview In this quick tutorial, we’ll illustrate how we can check if a String is containing at least one of each of the following: uppercase letter, lowercase letter, digit or special character in Java. 2. Using Regular Expressions… Continue Reading java-lowercase-uppercase-special-character-digit-regex

Introduction to Spring Method Security 1. Introduction Simply put, Spring Security supports authorization semantics at the method level. Typically, we could secure our service layer by, for example, restricting which roles are able to execute a particular method – and test it using dedicated method-level security test support. In this… Continue Reading spring-security-method-security

Converting Between Byte Arrays and Hexadecimal Strings in Java   1. Overview In this tutorial, we’ll take a look at different ways to convert a byte array to a hexadecimal String, and vice versa. We’ll also understand the conversion mechanism and write our implementation to achieve this. 2. Converting Between… Continue Reading java-byte-arrays-hex-strings

A Guide to Apache Commons Collections CollectionUtils 1. Overview Simply put, the Apache CollectionUtils provides utility methods for common operations which cover a wide range of use cases and helps in avoiding writing boilerplate code. The library targets older JVM releases because currently, similar functionality is provided by the Java… Continue Reading apache-commons-collection-utils

Inheritance and Composition (Is-a vs Has-a relationship) in Java 1. Overview Inheritance and composition — along with abstraction, encapsulation, and polymorphism — are cornerstones of object-oriented programming (OOP). In this tutorial, we’ll cover the basics of inheritance and composition, and we’ll focus strongly on spotting the differences between the two… Continue Reading java-inheritance-composition

A Simple E-Commerce Implementation with Spring 1. Overview of our E-commerce Application In this tutorial, we’ll implement a simple e-commerce application. We’ll develop an API using Spring Boot and a client application that will consume the API using Angular. Basically, the user will be able to add/remove products from a product… Continue Reading spring-angular-ecommerce