Program run...but not going to next exercise.In object oriented method 2


Replace this line with your code.


maybe you did some mistake.please post your code with the lesson link


class Dog {

int age;

public Dog(int dogsAge) {
age = dogsAge;


public void bark() {



public void run(int feet) {

System.out.println("Your dog ran " + feet + " feet!");


public static void main(String[] args) {

Dog spike = new Dog(5);


it is showing that insert run method between bark and main method.I have done it.It used to print value but not moving to next exercise.


did you do step by step?
first complete instruction 1 then go for instruction 2

Don't do all at once


thnku..i have completed it now.


most welcome.......... :slight_smile:


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