cannot find symbol error

method printIn (java.lang.string)

Page 1 of 1

5 Replies - 3340 Views - Last Post: 18 June 2009 - 04:50 PM Rate Topic: -----

#1 hmsanh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-June 09

cannot find symbol error

Post icon  Posted 15 June 2009 - 08:30 AM

I am an absolute biginner to Java programming. But unfortunately my first code resulted ina n error message.
My code was as follows;
 class MyFirstJavaProgram
		  {
			 public static void main(Stirng[]args)
			 {
				   System.out.printIn("This is My First Java Program");
			  }
		   }



But when I compiled it it gave an error message as follows;
[error code] My First Java Program.java:5:cannot find symbol
symbol: method prinyIn (java.lang.string)
location: class java.io.PrintStream
System.out.printIn("This is my first Java Program")
/\
1 error
[/error code]

Please tell me where I have gone wrong and how I could rectify it. I felt really helpless when my firstever code went wrong.

Is This A Good Question/Topic? 0
  • +

Replies To: cannot find symbol error

#2 Gasper   User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 66
  • Joined: 29-May 09

Re: cannot find symbol error

Posted 15 June 2009 - 08:37 AM

Woops, it is println (print line)
(capital letters - PRINTLN)
Was This Post Helpful? 1
  • +
  • -

#3 computerfox   User is offline

  • straight vegetarian kid

Reputation: 50
  • View blog
  • Posts: 3,772
  • Joined: 29-January 09

Re: cannot find symbol error

Posted 15 June 2009 - 09:35 AM

use print or println. hope that helps :)
Was This Post Helpful? 1
  • +
  • -

#4 hmsanh   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-June 09

Re: cannot find symbol error

Posted 18 June 2009 - 10:45 AM

View PostGasper, on 15 Jun, 2009 - 07:37 AM, said:

Woops, it is println (print line)
(capital letters - PRINTLN)



Thank You Very Very Much! Ya It worked.
Was This Post Helpful? 0
  • +
  • -

#5 abgorn   User is offline

  • sudo apt install brain -y
  • member icon

Reputation: 31
  • View blog
  • Posts: 1,423
  • Joined: 05-June 08

Re: cannot find symbol error

Posted 18 June 2009 - 10:50 AM

I made the same mistake when I started programming, set me back a month! :P
Was This Post Helpful? 0
  • +
  • -

#6 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8381
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: cannot find symbol error

Posted 18 June 2009 - 04:50 PM

View Postabgorn, on 18 Jun, 2009 - 09:50 AM, said:

I made the same mistake when I started programming, set me back a month! :P

36 years :D
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1