I can't see the difference?


#1

class Dog {
  
  int age;

	public Dog(int dogsAge) {
    
  	age = dogsAge;
    
  }

	public static void main(String[] args) {
    Dog Spike = new Dog(5);

	}

}

I am having the exact same issue, the above is rejected, but the following is the solution, I can't see the difference?

class Dog {
  
  int age;

	public Dog(int dogsAge) {
    
  	age = dogsAge;
    
  }

	public static void main(String[] args) {
    
    Dog spike = new Dog(5);

	}

}

Java OOP - 7.Objects
#2

spike is a variable, and it is proper for it to begin with a lowercase letter.