ProAnswers.org

How can we use PrintStream print methods?

You can pass any primitive type to the print method:

public class MainClass {

 

  public static void main(String[] args) {

    System.out.print(12);

    System.out.print('g');

 

  }

}

 

output

12g