8. Methods Cannot find symbol



<It shows Dog.java:18: error: cannot find symbol
Dog spike = new age(4);
symbol: class age
location: class Dog
1 error>

class Dog {

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

public void bark(){

	public static void main(String[] args){

		Dog spike = new age(4); 



You donot have any class implementation called age that's the compiler is complaining.


Thank You problem solved. it was new "Dog" not age..


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