java - How can I get a method to print? -


i wanted make simple program calendar in text. first time tried print method, can't figure out how it.

public class calendar{ public static void main(string[] args){ system.out.println("january: "); system.out.println("s   m   t   w   th  f   s"); } public static void displaymonth(int i){ (i = 1; < 32; i++){     if (i < 10){         system.out.print(i + "   ");     }else{         system.out.print(i + "  ");     }     if (i % 7 == 0 ){     system.out.print("\n");              }          }     } } 

that code. how "displaymonth appear?

add displaymonth(1) bottom of main function.

also, find java tutorial.

p.s. ignoring argument function, setting 1.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -