Mega Code Archive

 
Categories / Java Tutorial / Development
 

PrintStream has many print method overloads that accept different types

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');   } } 12g