• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

What is wrong with this test code?

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

I'm new to java and learning from head first. It gave me a test code, but when I try to compile it, it gives errors.
Code:
---------------------

--------------------
Errors:
-----------------------------

------------------------------
Thank you for helping in advance!

[Edit: put code between [code] and [/code] ubb code blocks]
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Albert,

Welcome to the Ranch.

It is not printIn (with a capital "i"), but println (with a lower-case "L").

So:
 
Albert Tarcy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Andrew Monkhouse wrote:Hi Albert,

Welcome to the Ranch.

It is not printIn (with a capital "i"), but println (with a lower-case "L").

So:


Oh haha. My mistake, but I thought print in would make more sense ;) Thanks a lot for helping!
 
Bartender
Posts: 4568
9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Albert Tarcy wrote:Oh haha. My mistake, but I thought print in would make more sense ;) Thanks a lot for helping!


println is short for print-line. It adds a line break at the end of whatever you print. There's also a print method, which omits the line break.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic