package org.funtimecoding.java.skeleton;

public class JavaSkeletonMain {
    public static void main(String[] args) {
        JavaSkeletonMain application = new JavaSkeletonMain();
        application.run();
    }

    public int run() {
        System.out.println("Hello friend.");

        return 0;
    }
}

package org.funtimecoding.java.skeleton;

public class JavaSkeletonMain {
    public static void main(String[] args) {
        JavaSkeletonMain application = new JavaSkeletonMain();
        System.exit(application.run());
    }

    int run() {
        System.out.println("Hello friend.");

        return 0;
    }
}

exit with own exit code, make run method package private as suggested