Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Help with tasks
Reviews
About us
Start
Start learning
Start learning now
All questions
Ask a question
All quests
All levels
Any status
Questions about tasks
Hot
Ted404
Level 11
Dubai
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Archived
It is already working. I used the help option to check the right answer. But I still didn't understand why we needed to use for loop twice and how we compared the String according to its number of letters??? Can anyone explain please with the most easiest language as you can. I feel like dumb.
package com.codegym.task.task07.task0708; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /* Longest string */ public class Solution { private static List strings; public static void main(String[] args) throws Excep
13.03.2020
938
views
2
comments
0
Vishwambhar Awagan
Level 8
Pune
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Under discussion
Getting Array out of Bound if I run it
D
19.10.2018
1306
views
2
comments
0
Saheb Das
Level 8
Gurgaon
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Under discussion
Can't find issue
02.11.2019
918
views
2
comments
0
Log
Level 14
Nottingham
Question about the task
Set of cats
Java Syntax
,
Level 8
,
Lesson 11
Resolved
No requirements met, but it works perfectly?
Absolutely confused here - I'm even failing on conditions that are obviously met, such as "The program should display text on the screen." Am I coming at this from the completely wrong angle?
12.03.2020
965
views
6
comments
0
DEEPAK KUMAR
Level 24
Delhi
Question about the task
Find a substring
Java Multithreading
,
Level 2
,
Lesson 5
Under discussion
Output matches correctly bur result not verifying....
package com.codegym.task.task22.task2202; /* Find a substring */ public class Solution { public static void main(String[] args) { System.out.println(getPartOfString("CodeGym is the best place to learn Java.")); } public static String getPartOfString(String string) { i
11.02.2020
973
views
2
comments
0
Niranjan Soni
Level 15
Bangalore
Question about the task
Boss, something weird is happening
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
Last condition is not verifying.
What's wrong in my code? Last condition is not verifying.
26.09.2018
1865
views
9
comments
0
Earil
Level 25
Paris
Question about the task
Horse racing
Java Core
,
Level 6
,
Lesson 5
Archived
Need help understanding why one code works and the other doesn't !
Hello, I couldn't manage to find the solution, so I snooped a bit in the help section. I stumbled upon this working code : public static int calculateHorsesFinished(List<Horse> horses) throws InterruptedException { int finishedCount = 0; for (int i = 0;i< horses.size();i
24.06.2019
1010
views
2
comments
0
Emil Valentin Toma
Level 6
Stockport
Question about the task
The basis of a wheel
Java Syntax
,
Level 5
,
Lesson 9
Resolved
Parameters not recognized
It won't accept the solution. It ran without errors. The three double parameters are there.
26.03.2019
1420
views
3
comments
0
Bogdan Iacob
Level 7
London
Question about the task
Even and odd digits
Java Syntax
,
Level 6
,
Lesson 5
Resolved
Not meeting odd requirement
Can anyone give me a hint? It is printing the correct numbers but it says odd is not calculated.
10.03.2020
887
views
3
comments
0
manoj deo
Level 3
Jakarta
Question about the task
Multiplication table
Java Syntax
,
Level 3
,
Lesson 6
Resolved
its not working
help
01.10.2018
1864
views
3
comments
0
dD
Level 17
Novi Sad
Question about the task
Sum of 5 numbers
Java Syntax
,
Level 3
,
Lesson 4
Resolved
Confused
Can someone please tell me why my solution is not good, when the output is right and there are no errors?
18.01.2019
2618
views
13
comments
2
Sanjay Chauhan
Level 28
Delhi
Question about the task
Five winners
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Failing in passing sort() method
Dear CodeGym Members, Good Morning. Will it be possible for you to have a look at my solution. I am failing at Sort() method although I am getting correct output in CodeGym as well as in the IntellJ. Thanks in advance for your valuable time and feedback. Have a nice weekend, Sanjay Chauhan
15.02.2020
1456
views
3
comments
1
Wojtek
Level 23
Solec-Zdroj
Question about the task
Advanced file search
Java Collections
,
Level 1
,
Lesson 2
Under discussion
How to resolve problem of a maximum or minimum file size (int)?
need hint
24.04.2019
1584
views
3
comments
0
Pablo Souza
Level 22
Brisbane
Question about the task
Positive and negative numbers
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
My doubled number keeps being multiplied by 10.
Hey folks, no idea what's going on, as my doubled number is always multiplied by 10.
12.03.2020
843
views
2
comments
0
Anthony Chalk
Level 30
London
Question about the task
Everything ingenious is simple!
Java Multithreading
,
Level 1
,
Lesson 2
Resolved
Please help
4th requirement isn't passing; but I'm sure it's correct
12.03.2020
874
views
2
comments
0
Ntuthuko Xaba
Level 18
Johannesburg
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Looking for some insight
Guys although I've solved the task I don't understand why the following solution doesn't work. I know I can't use a ' for loop ' to remove elements but this seems to make sense ,but it doesn't work. Iv'e tried googling with no satisfactory answers. Why doesn't this work : Iterator
12.03.2020
976
views
2
comments
0
Art
Level 13
Chisinau
Question about the task
Set of cats
Java Syntax
,
Level 8
,
Lesson 11
Under discussion
Correct output but won't go through
Hey everyone! Can you help me detect where's the problem? Thanks a bunch!
12.03.2020
797
views
1
comment
0
catalinene
Level 29
Greven
Question about the task
Finding data inside a file
Java Core
,
Level 8
,
Lesson 11
Resolved
How does the pattern look like?
The task describes the pattern as: id productName price quantity. So how I picture it is this (for example): 1 iPhone 2xs 1999.99 3. So if the name (iPhone 2xs) has spaces and numbers in it, how can I distinguish betwen what is what, I mean where the name finishes and the ''price'' starts?
11.03.2020
936
views
3
comments
0
Adnan Razzaq
Level 15
Bamberg
Question about the task
OOP: Animal inheritance
Java Core
,
Level 5
,
Lesson 2
Under discussion
not verifying?
i cant verify it.
12.10.2019
1229
views
2
comments
2
catalinene
Level 29
Greven
Question about the task
Symbol frequency
Java Core
,
Level 8
,
Lesson 11
Resolved
Output matches the task condition, but fails passing
Every file I tried on showed a good result in correct order. Don't know what could go wrong
11.03.2020
983
views
3
comments
0
Tianxiang Wan
Level 16
Question about the task
Longest sequence
Java Syntax
,
Level 8
,
Lesson 6
Under discussion
test all situations. worked. just couldnt verify the last requirement
someone help me out pls
11.03.2020
892
views
1
comment
0
catalinene
Level 29
Greven
Question about the task
Splitting a file
Java Core
,
Level 8
,
Lesson 5
Resolved
"IndexOutOfBoundException" not seeing where exactly
The file I used for testing created a byte[] of length 47, and the last index accessed through the "fos1.write(buffer,midle,(buffer.length - 1))" (exception thrown at line 16) is 46. I don't see where the error is coming from. Thanks!(code below) public static void main(String[] args) {
09.03.2020
1145
views
8
comments
0
JianQiu Hwang
Level 35
Washington
Question about the task
Words with numbers
Java Core
,
Level 9
,
Lesson 11
Resolved
Is any case wrong? I cannot find why it wrong.
My test case include 1n n1 1n1 n1n abc1 adsa%4125 a1 abc3d @#$!%@%1 fasgqqr
11.03.2020
732
views
2
comments
0
Khalid
Level 7
Delhi
Question about the task
Plan to conquer the world
Java Syntax
,
Level 3
,
Lesson 8
Under discussion
Not working
It is showing error while i have tried a lot. Please help me.
20.10.2018
1568
views
5
comments
0
Niladri pradhan
Level 33
Mumbai
Question about the task
Cats
Java Core
,
Level 4
,
Lesson 4
Under discussion
why did i get a null pointer exception
null pointer exception
14.08.2019
1461
views
2
comments
0
Cristian Belu
Level 16
Timisoara
Question about the task
Minesweeper (Part 8/16)
Games
,
Level 0
,
Lesson 0
Resolved
Stuck on the validation!
Don't really understand what is the request here, please help! What does it mean by set countFlags to countMinesOnField?
22.08.2019
1164
views
4
comments
0
Art
Level 13
Chisinau
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Where's the issue?
Thanks.
11.03.2020
762
views
2
comments
0
Dino
Level 13
Zagreb
Question about the task
Task about algorithms
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Why is it not verifying?
The program works correctly, but it wont verify.
24.01.2019
2253
views
21
comments
0
Surabhi
Level 10
Question about the task
Longest sequence
Java Syntax
,
Level 8
,
Lesson 6
Resolved
where i am making a mistake?
the last condition is not fulfilled. It says -- Be sure that the program works correctly if the sequence consists of numbers greater than 127.
09.10.2018
2980
views
26
comments
4
Halmstark
Level 6
Warsaw
Question about the task
Even and odd digits
Java Syntax
,
Level 6
,
Lesson 5
Resolved
The code is working correctly, but is verified as wrong
Hello, the code is actually displaying what the task wanted, yet somehow it is verified as it was wrong. Can anyone spot the mistake?
25.05.2019
1883
views
8
comments
0
Show more
1
...
222
223
224
225
226
...
372
Please enable JavaScript to continue using this application.