Java, Software Development

Array-backed Lists in Java

In Java, there are these array-backed lists that are generated when you convert arrays to lists using Arrays.asList(…). The list and the array objects point to the same data stored in the heap. Changes to the existing contents through either the list or array result to changing the same data.

Software Development

Java – Copy array by range

This post will show you how to copy a subset elements of an array by range. For example, copy elements from index 3 to 4 (exclusive). The range values work in the same way as the String’s substring method.

Software Development

Java Numeric Promotion Rules

Java Primitive Types Consider the following Java primitive types and take note of the type’s size, e.g., 8-bit. For this post, we can ignore boolean, and char as they are not numeric types. [wp_ad_camp_1] Given the following table of Java

Software Development

Create Your Own Functional Interface in Java 8

What is a Functional Interface? [wp_ad_camp_1] Java 8 offers Lambda expressions to help us write better, and concise codes. Lambda expressions revolve around Functional Interfaces. So, what are Functional Interfaces? The simplest definition is: Functional Interfaces are Java Interfaces with