8. Methods Can not find Symbol

I am stuck on this exercise and I would appreciate help.

Error: Dog.java:17: error: cannot find symbol
symbol: method print1n(String)
location: variable out of type PrintStream
1 error

//create a custom Dog class
class Dog {
  //use instance variables to model our Car class after a real-life Dog

  //the class contructor for the Dog Class
  int age;

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

	public static void main(String[] args) {
    Dog spike = new Dog(5);



You are calling System.out.print1n, rather than System.out.println. Check for typos.

1 Like

I’m sorry, but they both look exactly the same to me.

System.out.print1n is not a valid method call… it has a 1 in it.

System.out.println IS a valid method call.

See the Java documentation for more information.

1 Like

I don’t even know what that character is. is doesn’t quite look like a “l” neither an i.

Edit: Oh sorry, I guess it is an l, I’m use it looking differently. at the time it looked more like a one than the letter l. Thanks for the help, sorry for being dumb.

1 Like

What you have in your program is as follows:
System.out.print1n. (The bolded character is a 1, it needs to be an l)

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