Java - Output tab character to create time table

Description

Output tab character to create time table

Demo

import java.util.Scanner;

public class Main {

  public static void main(String args[]) {
    int max = 5;/*from ww  w.j  ava 2s. c om*/
    

    for (int i = 1; i <= max; i++) {
      for (int j = 1; j <= max; j++) {
        System.out.print(i * j + "\t");
      }
      System.out.println(); // goes to new line right before up to next i
    }
  }
}

Related Topic