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 Java Basics Getting Started with Java IO

i do not understand

hemm i wrong :(

IO.java
String firstName = console.readLine ("First name ?  ");
  console.printf("First Name ", firstName);
console.printf("%s jam gay \n" , firstName);
String lastName = console.readLine ("Last name  ");
console.printf ("%s jam lezbike \n" , lastName);

2 Answers

Rune Andreas Nielsen
Rune Andreas Nielsen
5,354 Points

Hi Silvio, i did it this way. I think you're doing a lot more than the challenge asks you to do.

You just need to read the name, and lastname and print them out while using '%s'.

String firstName = console.readLine();
String lastName = console.readLine();

console.printf("First name: %s ", firstName);
console.printf("Last name: %s ", lastName);

thank you :)

Yahya Saadi
Yahya Saadi
4,277 Points

String firstName = console.readLine("Yahya");

String lastName = console.readLine("Saadi");

console.printf("First Name: %s", firstName);

console.printf("Last Name: %s", lastName);

Rune Andreas Nielsen
Rune Andreas Nielsen
5,354 Points

You might want to remove the string inside of the console.readLine();