Category: java
The following FileUtils.readFile takes a file path, and a second paramter charset – then it will read the content of the file and return as a string. This is …
Given Two Collection Types in Java, we want to find out if two collections are overlapping (intersection) i.e. Any of the elements in one collection are found in another. …
Given a UTF-8 Char Array, we can use the following Java Function to Convert to Raw Byte Array. Each UTF-8 Character has 3 types: 3 bytes, 2 bytes or …
Sometimes, we need to shuffle an array or list in Java – but we want to get the same “random” output for the same input. The following is a …
We can use the following Java command line program to print all loacal IP addresses of the computer. We iterate over all Net-Interfaces and get Inet Addresses. package com.helloacm; …