Search results for: Java
Java’s ‘this’ Keyword Explained: Why it Matters and How to Use It
In Java programming, the “this” keyword is used to refer to the current object. It is a reference to the object on which the method or constructor was invoked, and it is typically used to distinguish between class fields and local variables that have the same name. Understanding how to use “this” keyword is important…
Read More Java’s ‘this’ Keyword Explained: Why it Matters and How to Use ItThe ‘static’ Keyword in Java: Everything You Need to Know
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 KnowConstructor in Java: Everything You Need to Know
Objects and Classes: A Guide to Excel in Java Programming
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 ProgrammingMastering Java Naming Conventions for Superior Code
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 CodeOOP in Java: Basic Concepts and Advantages
PKCE Code Verifier and Code Challenge in Java
In this tutorial, you will learn how to generate the OAuth PKCE Code Verifier and the Code Challenge in Java. The Code Verifier and the Code Challenge are used in the OAuth PKCE-enhanced Authorization Code Grant flow and the specs on how these two should be generated can be found here RFC7636. To learn how…
Read More PKCE Code Verifier and Code Challenge in JavaHow to Set JAVA_HOME on macOS
In this tutorial, I am going to share with you how to set the JAVA_HOME environment variable on a new macOS. The new way of setting JAVA_HOME environment variable allows us to dynamically identify and use the current Java version installed on a computer as well as let us switch between Java versions if there…
Read More How to Set JAVA_HOME on macOSJava Objects Mapping with ModelMapper
With this tutorial, I am going to share with you how to convert one Java Model Class into another. You might need to use it when converting a DTO(Data Transfer Object) to an Entity bean and back from Entity bean to a DTO. And also when converting a DTO to a REST Model Object which…
Read More Java Objects Mapping with ModelMapperAdd Hours to Java Date and Compare Dates
In this short Java tutorial, I am going to share with you one of the ways you can use to add hours to a Java Date object and then compare that Date object with another date if needed. Add Hours to Java Date Object You can use the Instant and Duration objects to add a few hours…
Read More Add Hours to Java Date and Compare DatesJava 8 Functional Interface Tutorial
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 TutorialBase64 Encoding and Decoding Example in Java
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 JavaSend Email Message Using AWS SES Java SDK
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 SDKREST API with Java JAX-RS. Create and Deploy to Amazon Cloud.
When you start building a mobile app most likely you will need to build pages like user Sign up and once user has successfully registered, you will need to create a Sign in page. I have created many video tutorial how to implement these pages in Swift and if you follow those you will no doubt…
Read More REST API with Java JAX-RS. Create and Deploy to Amazon Cloud.