Stuck on 8/13


#1

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

I can’t seem to do this. it gives me the error message:

Dog.java:13: error: cannot find symbol
System.out.printIn(“Woof!”);
^
symbol: method printIn(String)
location: variable out of type PrintStream

I feel like something’s up with my code.



class Dog {

int age;

  public Dog(int dogsAge) {
  
  	age = dogsAge;

  }
  
  public void bark() {
    
   System.out.printIn("Woof!");
    
  }
  
	public static void main(String[] args) {
    
   		Dog spike = new Dog(1);
    
  	}

	}




#2

You use

System.out.printIn

and the valid statement is

System.out.println

( it is printline )


#3

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