Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

I need help differentiating between terms - Basic Java - HELP

difference between: console.printf and console.readLine

Are these methods? Attributes? Any other basic Vocab I should understand. Need help speaking Java.

1 Answer

Hey Diego,

Yes they are methods.

In general: console.printf writes out text to the console and console.readline takes input text from the user.

EXAMPLE: console.printf("Hello") would write the word hello to the console.

EXAMPLE:console.readline() would make us type in an input. a possible use it that we can store that input as a variable to use later on.

String input = console.readline() would ask us to type something and then we store that in the "input" variable

Hope that helped!