src/main/java/com/acme/calculator/main/Startup.java
/**
     * main() needed to run this program from the command line.
     * Verifies command-line arguments and prints usage to stdout
     * if the arguments are not as expected.
     *
     * @param args command-line arguments passed to this program
     */
main() needed to run this program from the command line.
Verifies command-line arguments and prints usage to stdout
if the arguments are not as expected.

@param args command-line arguments passed to this program
main () needed to run this program from the command line . Verifies command - line arguments and prints usage to stdout if the arguments are not as expected . @param args command - line arguments passed to this program
public static void main(final String[] args) {
        logger.info("main()");
        logger.debug("main(): arguments: {}", Arrays.asList(args));
        if (args.length == 1) {
            Calculator parser = new Calculator(MathContext.DECIMAL128);
            final String expression = args[0];
            final String result = parser.calculate(expression);
            logger.debug("Expression: '{}' -> result: '{}'", expression, result);
            System.out.println(result);
        } else {
            showUsage(args);
        }
    }
public static void main ( final String [ ] args ) { logger . info ( "main()" ) ; logger . debug ( "main(): arguments: {}" , Arrays . asList ( args ) ) ; if ( args . length == 1 ) { Calculator parser = new Calculator ( MathContext . DECIMAL128 ) ; final String expression = args [ 0 ] ; final String result = parser . calculate ( expression ) ; logger . debug ( "Expression: '{}' -> result: '{}'" , expression , result ) ; System . out . println ( result ) ; } else { showUsage ( args ) ; } }
main() needed to run this program from the command line.
main () needed to run this program from the command line .