title: Java: Issues with 0 arg constructors and constructors
body: <p>I'm having lots of issues trying to build a constructor where the variables already have default values, and then call the new variables which I set up later on in the TestGuitar class. I've had success compiling my program and printing the default values. I haven't had success retaining the new ones I tried to set up in the newGuitar variable in the TestGuitar class. I know all the issues are coming from my constructors. In this situation I need a 0 arg constructor that creates a default guitar and a new constructor that creates a very specific guitar.</p>
  
  <p>I set up some private variables for the default guitar. I want my program to return the default variables if I never pass anything to then newGuitar variable in the TestGuitar class. If I do pass something, i.e. guitarLength 24.75, I want my program to return that. Even further, I want that new variable to be callable by a getter method. I believe I have the 75% solution, but I need help specifically with the constructor issues at hand.  I just don't think I'm grasping the concepts of constructors enough to incorporate a 0 arg and a specific constructor at the same time.</p>
  
  <pre><code>//File name: Guitar.java
  //Autor: Michael Joy
  //Date: 09/16/2018
  //Purpose: Building and testing guitar objects
  
  import java.awt.Color;
  import java.util.*;
  import java.util.Random;
  
  class Guitar {
      //defines the default values for our default guitar if we do not pass anything new to the object
      private int numStrings = 6;
      private double guitarLength = 28.2;
      private String guitarManufacturer = "Gibson";
      private Color guitarColor = Color.RED;
      private static int i = 1;
      private static Random rand = new Random();
  
      //declaring the constructor
      public Guitar (){
          //all my problems coming from here
          this.numStrings = numStrings;
          this.guitarLength = guitarLength;
          this.guitarManufacturer = guitarManufacturer;
          this.guitarColor = guitarColor;
      }
  
      public Guitar (int strings, double length, String manufacturer, Color color){
          //more problems here
           strings = this.numStrings;
           length = this.guitarLength;
           manufacturer = this.guitarManufacturer;
           color = this.guitarColor;
           System.out.printf("toString: %s \n ", this);
      }
  
      public int getNumStrings() {
        return numStrings;
      }
  
      public double getGuitarLength() {
        return guitarLength;
      }
  
      public String getGuitarManufacturer() {
        return guitarManufacturer;
      }
  
      public Color getGuitarColor(){
        return this.guitarColor;
      }
  
      public static void playGuitar(){
          String[] musicNotes = {"A", "B", "C", "D", "E", "F", "G"};
          String[] musicDuration = {"(0.25)","(0.5)","(1)", "(2)","(4)"};
           System.out.print("playGuitar: ");
           for (i = 1; i &lt; 17; i++){
              int index1 = rand.nextInt(musicNotes.length);
              int index2 =  rand.nextInt(musicDuration.length);
              System.out.print(musicNotes[index1]);
              System.out.print(musicDuration[index2] + ",");
              }
           }
  
      public String toString(){
          return String.format("%d, %f, %s, %s", numStrings, guitarLength, guitarManufacturer, guitarColor);
      }
  }
  
  class TestGuitar extends Guitar{
          public static void main (String args[] ){
            Guitar newGuitar = new Guitar(6, 24.75, "Les Paul", Color.white);
            playGuitar();
    }
  }
  </code></pre>