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.
CodeGym. Learn once - use anywhere
You must be signed in to leave a comment
Anonymous #10764856 Java Developer at BDL Holding
2 August 2021, 18:15
i did all correctly and issue come during verification? What's the issue there
1 July 2021, 04:43
How to use loop function...?
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;"?
16 September 2021, 00:17
Yes. It's a linear progression course ) ... could be a loop thru / could be object access
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.
14 September 2020, 04:23
Your mistake was in something else, the solution using the variable phrase passes the test.
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!
30 June 2021, 18:05
Did u add ; at the end?
28 March 2020, 00:42
System.out.println("CodeGym. Learn once - use anywhere")
14 March 2020, 08:35
"learn once, use anywhere!" ???
16 September 2019, 02:21
Lol, took a long time to get, but I got it.
21 June 2019, 19:32
I used loo[p but the condition failed
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.
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'.
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.
23 May 2019, 17:14
it shows typo error whats that