title: Necklace Application
body: <p>I created a Necklace class with a static method that determines how many numbers the necklace sequence must generate to return to the original two numbers. Also the method called howLong that takes as parameters the first two items in the sequence. It generates a necklace sequence and return how many numbers must be generated to return to the original two numbers. I did not count the first two numbers in my total but did count them the final time they are generated. As you can see the code below I am printing something in the howLong method <em>System.out.print(two + " ");</em>, but it should not print anything. It should use a main method that calls howLong and prints the results. How can I do it?</p>
  
  <pre><code>import java.util.Scanner;
  public class Necklace {
      public static int howLong (int firstStarting, int secondStarting) {
  
          int sum = 0;
          int temp;
          int one = firstStarting;
          int two = secondStarting;
  
          do{
              temp = (one + two) % 10;
              one = two;
              two = temp;
              System.out.print(two + " ");
          }while (two != secondStarting || one != firstStarting);
  
          return (sum);
      }
      public static void main (final String[] args) {
  
          int total;
          int first;
          int sec;
  
          Scanner in = new Scanner (System.in);
          System.out.print("Enter the first starting number: ");
          first = in.nextInt();
  
          System.out.print("Enter the second starting number: ");
          sec = in.nextInt();
  
          total = howLong (first, sec);
      }   
  }
  </code></pre>