CodeGym /Courses /Java Syntax /Practice creating and using arrays

Practice creating and using arrays

Java Syntax
Level 7 , Lesson 4
Available

"Hi, Amigo! Here are a few tasks for you, my friend:"

7
Task
New Java Syntax, level 7, lesson 4
Locked
Minimum of two numbers
Minimum of two numbers
7
Task
New Java Syntax, level 7, lesson 4
Locked
Minimum of three numbers
Minimum of three numbers
7
Task
New Java Syntax, level 7, lesson 4
Locked
Minimum of four numbers
Minimum of four numbers
7
Task
New Java Syntax, level 7, lesson 4
Locked
Repetition is the mother of all learning
Repetition is the mother of all learning
7
Task
New Java Syntax, level 7, lesson 4
Locked
Print three times
Print three times
7
Task
New Java Syntax, level 7, lesson 4
Locked
Even to the moon!
Even to the moon!
Comments (63)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
LaikaLaikaka Level 32, United States of America, United States
17 March 2025
In IntelliJ IDEA, when we run the code, why this doesn't give the output like the one in website? Do we need to give input ourself?
Sai Konkimalla Level 1, United States of America, United States
2 October 2025
no duh
BackwardsPi314 Level 6, San Francisco, United States
31 July 2024
Wauoh...
Radian Hoque Level 7, Footscray, Australia
3 February 2024
the street and houses was not tough to code but tough to breakdown the task requirements, make sure to read each requirements and if it helps you try to write the conditions step by step.
rags 3 Level 5, Wichita, United States Expert
7 July 2023
the street and houses one is touchy can have correct code still wont run
Jill L Level 10, China, China
25 February 2023
For task"2 arrays", What command can display the length of a string element in a string array?
rags 3 Level 5, Wichita, United States Expert
7 July 2023
what ever you name your string stringname.length String[] list = new String[]; list.length;
Anonymous #11672331 Level 9, Columbus, United States
10 September 2025
Actually it's stringName.length()
Godwin Level 14, Sango, Nigeria
18 October 2022
one thing I found very helpful is the debug tool in IntelliJ IDEA, it showed me the array index out of bound error clearly and I knew how to solve it, the result is passing verification once.
calibers16 Level 6, Knowhere, United States
8 September 2022
FYI, my solution to "2 arrays" works as expected and produced the identical output to the "correct solution," but for some reason it would fail the verification process. Jsyk.
rags 3 Level 5, Wichita, United States Expert
7 July 2023
the test are touchy some times you may have a space or something
Mindaugas Level 23, Lithuania
27 August 2022
Yeah, the hard task is not really that hard, but you have to read carefully third point, I failed 4 times verification only because misread what I needed to count 🧐
Krig Raseri Level 38, Dallas, United States
9 August 2022
The hard task is only harder because of the way it's written, and not actually coding it. Pay close attention to what it's asking for.
Boris Level 7, Novi Sad, Serbia
12 April 2022
One large array and two small ones: the following method of the java System class can be useful:

System.arraycopy(SourceArray, int srcPosition, TargetArray, int Position, int numberOfElements );