A Java program to calculate the minimum number of balloons that can be used to spell the given word.
The program takes a string as input and counts the number of occurrences of the letters B, A, L, O, and N. The letters L and O must be counted in pairs. The result is the minimum number of balloons that can be used to spell the given word.
The solution method takes a string S as input and returns an integer representing the minimum number of balloons needed to spell the word.
The program requires Java 8 or higher.
This program is a solution to a programming challenge and is meant for educational purposes only.