• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

cannot find method println

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

I started learning java with your OCA book and I wrote this code:



And I got this error:
(The code does compile and run without an error when the main argument is empty)

error.png
[Thumbnail for error.png]
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the first error is pointing out that you have written prinln and not println.

Can't tell about the others as you've shown an image rather than copy/paste the text here, and the image does not appear on the "make post" page, so I can't see it while writing this.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh...you have arg rather than args.
 
Sheriff
Posts: 17264
299
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Programming is very precise about spelling, especially when it comes to parameter and method names.. Wouldn't you complain if people called you Leter instead of Lester?

The error messages tell you which names you misspelled.
 
Lester van Dinteren
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh lol, that is funny, just some typos

Thank you very much!
 
Bartender
Posts: 387
47
Firefox Browser MySQL Database Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Always go through any error messages carefully. For simple errors, the error messages will usually tell you exactly what is wrong. Here it is telling you that it can't find 'prinln' or 'arg'. If it can't find it, it does not exist.

Tip: I usually tackle the first error, then recompile. Take them one by one; sometimes you will get multiple errors which are caused by one issue.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic