title: why main method prints the values using the code value instead of what i gave for constructor value
body: <p>i am very new to Java and im learning how to use constructors. I have a Dog class as follow :</p>
  
  <pre><code>public class Dog{
  
  private String name;
  private String color;
  private int age;
  
  public Dog() {
      System.out.println("this is a Default constructor : ");
      name = "unknown";
      color = "unknown";
      age = 12;
  }
  
  public Dog(String newName, String newColor, int newAge){
      System.out.println("this is a new constructor accepting parameters: ");
      name = newName;
      color = newColor;
      age = newAge;
  }
  
  public String getName(){
      return name;
  }
  
  public String getColor(){
      return color;
  }
  
  public int getAge(){
      return age;
  }
  }
  </code></pre>
  
  <p>so, so far i have a class called "Dog" with the above code in it .
  then I have a Main class where I put my main method in there which is as follow :</p>
  
  <pre><code>public class Main {
  
  public static void main(String args[]){
      Dog dog1 = new Dog("Belfi", "White", 12);
      System.out.println("My dog's name is: " + dog1.getName()+" his color is: "+ dog1.getColor()+" and he is "+ dog1.getAge()+ " years old."); 
  
  }
  }
  </code></pre>
  
  <p><strong>my question are :</strong></p>
  
  <ol>
  <li><p>Do I always need to create an object using one of the existed
  constructor patterns in my class ? for-example here i created a new
  "dog1" obj which take 3 parameters as argument just same as the
  second instructor in the code (which has 3 arguments too) ?  if yes,
  how if there is no constructor that user wrote it , then how should
  we create obj ? just Dog dog1 = new Dog(); ?? obj creation always
  follow the constructor's pattern for argument that it take?</p></li>
  <li><p>the second thing which sounds very confusing to me is that, after
  i wrote the code in both Dog class and Main class (exact same as
  above codes) , i compiled them and then i tried to right click on
  the class Dog and selected the newDog(String newName, String
  newColor, int newAge) and then it asked me to enter newName( I put
  "Belfi"), newColor(I put "Black") and newAge (I put 10) , and then
  clicked on OK :</p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/dQSXW.png" rel="nofollow noreferrer">creating new Dog</a></p>
  
  <p>after doing this I have an obj created that is as  following : 
  <a href="https://i.stack.imgur.com/8jy5Y.png" rel="nofollow noreferrer">object created </a></p>
  
  <p>also this sentence "this is a new constructor accepting parameters: " got printed.
  what i don't understand now is the fact that when i run the Main method , it completely ignores the parameters I gave to the constructor ("Belfi", "Black", 10) at the time that i created the new object and it prints the sentence using the values that i gave to the obj when creating the new obj in the main method .</p>
  
  <p>what it prints : "My dog's name is: Belfi his color is: White and he is 12 years old."</p>
  
  <p>can anybody explain me why the new obj has not been created using the values I gave to the constructor ? and it used the values that i out in the code?</p>