java

In Java programming, the “static” keyword is used to define a class-level entity that can be accessed without the need to create an instance of the class. It is a powerful keyword that can be used to define static variables, methods, blocks, and classes. Understanding the concept of “static” is important for any Java programmer…

Read More The ‘static’ Keyword in Java: Everything You Need to Know

Java is an object-oriented programming language that uses the concept of objects and classes to represent real-world entities and their interactions. Understanding these concepts is essential for developing robust and scalable Java applications. In this tutorial, I will explain to you the fundamentals of objects and classes in Java, including their definition, creation, and usage.…

Read More Objects and Classes: A Guide to Excel in Java Programming

By following these naming conventions, your code will be consistent and easy to read, making it easier to collaborate with other developers and maintain your code over time. CamelCase in Java CamelCase is a naming convention that is commonly used in Java for naming variables, methods, and classes. It involves writing the first letter of…

Read More Mastering Java Naming Conventions for Superior Code

In this short Java tutorial, you will learn how to quickly generate a serialVersionUID for a given class. Most Java IDEs provide a support for generating serialVersionUID automatically while some require you to install a plugin for you to generate this value. Generate SerialVersionUID for a Java Class There is a built-in command in JDK…

Read More How to Generate SerialVersionUID

Adding dependency injection support into Jersey 2 Web Services application that uses HK2 is not very straightforward. So, I created this page to document things I needed to do in my Jersey 2 RESTful Web Services app to make the Dependency Injection work. Hope you will find it useful. Create a new class that extends AbstractBinder. This…

Read More Dependency Injection with HK2 in Jersey and JAX-RS

Create a Servlet Container deployable Jersey web application Create new Jersey web application using Maven. The project created with the below jersey-quickstart-webapp archetype can be built and deployed to a servlet container like for example Apache Tomcat. mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \ -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.26 POM.XML Dependency to Support JSON To support JSON in your Jersey Web App add…

Read More RESTful Web Services with Jersey and Spring Data JPA – Cheat Sheet

Recently I have published a video course that teaches how to use Java JAX-RS to create a RESTful Web Service for your mobile application and how implement features like user Sign up, Sing in and how to communicate with protected Web Service Endpoints. I would love it if you check it out and hopefully like it, find…

Read More Deploy Web Application Archive(WAR) to Amazon AWS EC2 Linux Instance

In this blog post I would like to share with you how to use Java 8 Functional Interfaces and how to create your own functional interface. What is Functional Interface? Functional interface is a Java interface with single abstract method. Below is a very simple example of a functional interface: package com.appsdeveloperblog; @FunctionalInterface public interface MyFunction<A,…

Read More Java 8 Functional Interface Tutorial

In this short Java programming tutorial I am going to share with you how to take a String value and Base64 encode it. We will then take the Base64 encoded String value and will decode it back into original String. There are different libraries out there that allow us to use Base64 encoding and decoding and…

Read More Base64 Encoding and Decoding Example in Java

In this Java programming tutorial I would like to share with you a sample Java code that uses Amazon AWS SES(Simple Email Service) Java SDK to send an email message. I used this code implement Email Verification feature for my mobile app. The code below would send an email message containing an email verification link…

Read More Send Email Message Using AWS SES Java SDK