public class ArgumentsExample {
    public static void main(String[] args) {
        //check if we're debugging
        boolean isDebugging = false;
        for (String arg : args) {
            if (arg.equals("debug")) {
                isDebugging = true;
            }
        }
        
        int[] numbers = {23, 13, 2, 1};
        int sum = 0;
        for (int i = 0; i < numbers.length; i++) {
            //print out debug messages
            if (isDebugging) {
                System.out.println("Adding " + numbers[i] + " to " + sum + "...");
            }
            
            sum += numbers[i];
        }
        System.out.println("The sum is " + sum);
    }
}