Home

What are resizable arrays and an ArrayList?

In programming languages like Java arrays have fixed size. Means you cannot change the size of an array after its creation. This is how you would initialize an array in Java: int[] integerArray = new int[10]; This will initiate an integer array of size 10, and since we provided the size of the array, it cannot hold more than 10 values. For s...

Read more

How to reverse a String in Java

There are multiple ways to reverse a given string in java. The more traditional way to do this is by using the plain old for-loop. But Java also has built-in data structures that provide different ways to achieve this. How to reverse a string in Java using traditional for loop public class ReverseString { public static void main(String[] a...

Read more