Methods 10/13: Complies and displays correct result but doesn't let me move on?


#1



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


Little message at the bottom says "Did you create the run method? Place it in between the bark and main method.


class Dog {
  
  int age;

	public Dog(int dogsAge) {
    
  	age = dogsAge;
    
  }
  
  public void bark() {
		
    System.out.println("Woof!");
    
	}
	
  public void run(int feet) {
    
    System.out.println("Your dog run " + feet + 
                       " feet!");

	}
  
	public static void main(String[] args) {
    
    Dog spike = new Dog(5);
    spike.bark();
    spike.run(39);

	}

}


#2

Also the first step box on the left is exed like it is incorrect


#3

It may be trying to run System.out.println("Your dog run " + feet + "feet!"); and resulting in "Your dog run 39 feet." instead of "Your dog ran 39 feet."

Could be codecademy nitpicking. Otherwise, I don't seen an issue.


#4

I tried fixing that and it still shows the same error


#5

Having the same issue! :frowning:


#6

even i had the same issue, try to run the instructions step by step it worked out for me


#7

Yes. Same here. I tried to run the instructions step by step and it worked out for me.


#9

did they fix this yet ?


#10

Doesn't look like (they have fixed it as yet) however I've tried the advise of the two before me to run the instructions step by step (& that apparently means not just commenting out the bits but actually deleting it) and then it worked out for me too.


#11

im having the same issue as well nothing works for me


#12

Worked for me as well, thank you!


#13

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