Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

public static void nPrintln(String message, int n) {

1   public class Test {
 2     public static void main(String[] args) {
 3       nPrintln(5, "Welcome to Java!");
 4     }
 5
 6     public static void nPrintln(String message, int n) {
 7       int n = 1;
 8       for (int i = 0; i < n; i++)
 9         System.out.println(message);
10     }
11  }
Source by liveexample.pearsoncmg.com #
 
PREVIOUS NEXT
Tagged: #public #static #void #int
ADD COMMENT
Topic
Name
9+8 =