Category: java
Letting users picking password in console is a commonly wanted feature. We let the users enter a password string, and check if it is a valid password e.g. minimal …
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 …