• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is wrong with this test code?  RSS feed

 
Albert Tarcy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Posts: 12156
256
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Likes 2
  • Mark post as helpful
  • send pies
  • 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
  • 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!
 
Matthew Brown
Bartender
Posts: 4568
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!