CodeGym. Learn once - use anywhere

  • 1
  • Locked
Here's a riddle: "Written once, it runs everywhere". Answer: A Java program. That's the right answer, because Java is logical and properly structured. Let's rephrase this slogan for students: "learn once, use anywhere!" Here's a little task on this topic: write a program that displays a useful phrase 10 times on the screen.
You can't complete this task, because you're not signed in.
Comments (31)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Anonymous #10764856 Java Developer at BDL Holding
2 August, 18:15
i did all correctly and issue come during verification? What's the issue there
RAYX2445
Level 4 , Nagpur, India
1 July, 04:43
How to use loop function...?
Barbara Fu
Level 2 , Seoul
16 September 2020, 06:14
I copied the println bit ten times because I have no idea what loop is. Seriously, brand new at this. Is there a lesson later on that tells me how to tell it "print this ten times" rather than "print this; print this; print this; print this; print this; print this; print this; print this; print this; print this;"?
Thomas
Level 7 , Scottsdale, United States
16 September, 00:17
Yes. It's a linear progression course ) ... could be a loop thru / could be object access
kenneth payne
Level 3 , San Diego, United States
12 September 2020, 19:34
I kept getting the typo error because I declared String phrase = "CodeGym. Learn once - use anywhere". Are we not allowed to declare variables of our own wording? I did not know the compiler required the use of the variable, String message.
Roman
Level 41
14 September 2020, 04:23
Your mistake was in something else, the solution using the variable phrase passes the test.
kenneth payne
Level 3 , San Diego, United States
14 September 2020, 23:13
after today's practice where I missed the period at the end of my statement, solidifies your reply, thank you for the input!
Kittenthecool1
Level 3 , United States of America
30 June, 18:05
Did u add ; at the end?
Rahul
Level 2 , Not in list, United States
28 March 2020, 00:42
System.out.println("CodeGym. Learn once - use anywhere")
Tomas
Level 8 , Petrovice, Czech Republic
14 March 2020, 08:35
"learn once, use anywhere!" ???
Deborah Wenrich
Level 7 , Pembroke Pines, United States
16 September 2019, 02:21
Lol, took a long time to get, but I got it.
OMAR BADIAL
Level 2 , Accra, Ghana
21 June 2019, 19:32
I used loo[p but the condition failed
Alex
Level 14 , Chicago, United States
3 July 2019, 15:53
Re-check your code to see if your loop statement is working. Does it work on another IDE like Intellij? Also make sure your loop is printing the line 10 times, no more, no less.
Recle
Level 1 , Perbaungan, Indonesia
15 June 2019, 16:27
I use loop, and I printed out the message directly, using System.out.println("CodeGym use anywhere"); and I failed the last test 'The displayed text must match the task conditions.' Why? there was no conditions stated that I have to insert the message into a string variable, which turns out to be the only thing my code was lacking when I click 'hint'.
Alex
Level 14 , Chicago, United States
3 July 2019, 15:51
I used loop and it worked fine. The message is supposed to be "CodeGym. Learn once - use anywhere" Try replacing your argument in System.out.println() with that.
Ankur Sharma
Level 1 , Mumbai, India
23 May 2019, 17:14
it shows typo error whats that