8/13, my fullstop is not working in code


#1


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

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

Hi,

I am able to get this code to work if i copy and paste the code that it gives you when you... I guess, give up.... but it is exactly the same, I am wondering if that dot should be something other than a full stop? because when I use my fullstop it wont work.... Have I done something wrong?

Thanks


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(5);

	}

}


#2

The error will be before the indicator so look in the line before that, above to start with.

Perhaps the white space is not permitted. Can't say, but try removing it.

bark()

#3

It's System.out.printn with l(capital letter will be L) not I(i).


#4
System.out.printIn("Woof!");
                ^
          as pointed out

#5

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