Preview:
public class Ok {
    public static void main(String[] args) {
        System.out.println("\n\n    1   2   3   4   5   6   7   8   9   10");// tab.
        System.out.println("----------------------------------------------");

        for (int i = 1; i <= 10; i++) {
            if (i < 10) {
                System.out.print(i + " |");
            } else {
                System.out.print(i + "|");
            }
            for (int j = 1; j <= 10; j++) {
                int z = i * j;
                if (z >= 10) {
                    System.out.print(z + "  ");
                } else {
                    System.out.print(z + "   ");
                }
            }
            System.out.println();
        }

    };

}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter