title: Two methods: One defines the values of variables and the other is a constructor that attributes the value to the object
body: <pre><code> public String toString(){
  
      Scanner keyboard = new Scanner(System.in);
  
      System.out.println("Please enter 3 digits for your code.");
  
      int a = keyboard.nextInt();
      int b = keyboard.nextInt();
      int c = keyboard.nextInt();
  
      String formatcode = "Clockwise " + a + "- Counter-Clockwise " + b + "- Clockwise " + c;
  
      System.out.println(formatcode);
  
      keyboard.close();
      return formatcode;
  }
  
  CombinationLock(int a, int b, int c){
  
      num1 = a;
      num2 = b;
      num3 = c;
  
      open = true;
  
  
  
  }
  </code></pre>
  
  <p>I have these two methods but I can't seem to get them to work together in my driver to initialize the variables for my object. It seems weird to have a constructor work after a method but I was asked to do it this way. Any tips or hints are appreciated.</p>