Run a Java Application from the Command Line 1. Overview Typically, every meaningful application includes one or more JAR files as dependencies. However, there are times a JAR file itself represents a standalone application or a web application. We’ll focus on the standalone application scenario in this article. Hereafter, we’ll… Continue Reading java-run-jar-with-arguments

Java Base64 Encoding and Decoding 1. Overview In this tutorial, we’re going to explore the various utilities that provide Base64 encoding and decoding functionality in Java. We’re mainly going to illustrate the new Java 8 APIs as well as the utility APIs coming out of Apache Commons. Further reading: Guide… Continue Reading java-base64-encode-and-decode

Composition, Aggregation, and Association in Java 1. Introduction Objects have relationships between them, both in real life and in programming. Sometimes it’s difficult to understand or implement these relationships. In this tutorial, we’ll focus on Java’s take on three sometimes easily mixed up types of relationships: composition, aggregation, and association.… Continue Reading java-composition-aggregation-association

Selection Sort in Java 1. Introduction In this tutorial, we’ll learn Selection Sort, see its implementation in Java, and analyze its performance. 2. Algorithm Overview Selection Sort begins with the element in the 1st position of an unsorted array and scans through subsequent elements to find the smallest element. Once found,… Continue Reading java-selection-sort

Java Compiler Error: “class, interface, or enum expected” Java 1. Overview In this quick tutorial, we’re going to talk about the Java compiler error “class, interface, or enum expected”. This error is mainly faced by developers who are new to the java world. Let’s walk through a few examples of this… Continue Reading java-class-interface-enum-expected