Creating a Constructor


#1



https://www.codecademy.com/courses/learn-java/lessons/object-oriented-programming/exercises/classes-constructors?action=lesson_resume&link_content_target=interstitial_lesson

I created the constructor EXACTLY as it looks in the sample, only changing the word Car to Dog. When I click the run button the messages says "Did you create a contractor for Dog?) I did. Here is the code.


class Dog {

	public Dog() {
  
  }


	public static void main(String[] args) {

	}

}


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.