title: design procedure printString
body: <p>basically i have a question. got new work book today from college with couple of questions and one is following:</p>
  
  <p>Design a procedure printString to input an integer n and a string s, and print n copies of (the value of) n on the screen, two copies per line (except, possibly, the last line).
  If the user enters a negative value for n, the computer should print a complaint.</p>
  
  <p>So my code is this:( also compiles and does whatever the question asked me to do)</p>
  
  <pre><code>import java.util.*;
  
  
  public class Question5 {
      public static void main(String[] args) {
  
          Scanner input = new Scanner(System.in);
          String s = "";
          int n = 0;
  
          System.out.println("Type in any string");
          s = input.nextLine();
  
          System.out.println("Type in any integer");
          n = input.nextInt();
  
          if (n &gt; 0) {
              while (n &gt; 1) {
                  System.out.println(s + "\t" + s);
                  --n;
                  --n;
              }
              if(n == 1){
                  System.out.print(s);
                  --n;
              }
          } else {
              System.out.println("Please do not use negative value.");
          }
      }
  }
  </code></pre>
  
  <p>I wanted to ask what did my teacher have in mind by saying procedure printString? a method?</p>
  
  <p>Thank you!</p>