Promotion
CodeGym University
Java FullStack
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
Java 25
All quests
All levels
Any status
Questions about tasks
Hot
Darko Jakimovski
Level 18
Kriva Palanka
Question about the task
Creating threads recursively
Java Core
,
Level 6
,
Lesson 13
Resolved
Can't see my mistake
I only get one line of output. I revisited each line a couple of times and can't find what's the problem. It only creates one object WhyTheFace?!
5/22/19
2016
views
6
comments
1
NOBODY
Level 5
Question about the task
Initializing objects
Java Syntax
,
Level 5
,
Lesson 7
Under discussion
still trying
anybody?
10/27/20
698
views
4
comments
0
Vlad
Level 29
Khon Kaen
Question about the task
CRUD 2
Java Core
,
Level 7
,
Lesson 10
Resolved
i dont see anything wrong with this but 5 & 6 wont pass
please help
7/28/21
846
views
2
comments
0
Abdelrahman
Level 5
Amman
Question about the task
Initializing cats
Java Syntax
,
Level 5
,
Lesson 7
Under discussion
help
I haven't continued yet but I have run into an issue so since I already have public void initialize(String name, int weight, int age) Typed in line 18 I cant type public void initialize(String name, int age, int weight) On line 23 but its what its asking from me so any hint on what to do
3/14/21
961
views
2
comments
0
Andrei
Level 41
Question about the task
The long forgotten Array
Java Collections
,
Level 7
,
Lesson 10
Under discussion
What is the difference between returning the solution and returning an initialized array ?
In line 20, I wanted to return return new Number[]{4,5,6}; but the mentor wouldn't accept my version. Why is that? package com.codegym.task.task37.task3706; import java.util.Arrays; import java.util.List; /* The long forgotten Array */ public class Solution { public static void ma
7/26/21
708
views
5
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
2048 (Part 11/18)
Games
,
Level 0
,
Lesson 2
Resolved
This is a tough one
I am having a harder time with this than any other task. I want to do this with a loop, but I had to find a pattern first so I wrote out all 16 parts of the rotation. It seems like I found the pattern but it still won't validate. In the example, I am assuming that gameField[0] is the first array, {
7/26/21
655
views
2
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
2048 (Part 6/18)
Games
,
Level 0
,
Lesson 2
Under discussion
Why do we invert gameField[x][y] to gameField[y][x]? It produces wrong cell reference
My code passed validation so I can't attach any code. I'm less concerned about validation than about the code making sense. I have added some simple println statements to get the two cells that are set. Here is one example with a screenshot of the board: When I test the values I get: gameField[1][0
7/26/21
887
views
4
comments
0
Mukesh Vudayagiri
Level 10
Ferokh
Question about the task
Implement the fight method
Java Syntax
,
Level 5
,
Lesson 5
Under discussion
What's wrong in this code. Help needed.
Somebody help me with this. It's not accepting the code. What's wrong with this. I cannot find (It's showing "If cat1 beats cat2, then cat2 must lose to cat1.").
8/28/18
2755
views
13
comments
1
Evgen
Level 23
Question about the task
Number algorithms
Java Core
,
Level 10
,
Lesson 10
New
problem with output of Long.MAX_VALUE
I check program for many input values, for max integer it works fine, but it didn't output the last 7 numbers for max long
7/26/21
618
views
0
comments
0
David
Level 5
Question about the task
Sorting three numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
Last condition was not validated
[x] "The program should display the numbers in descending order." package com.codegym.task.task04.task0420; /* Sorting three numbers */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader
7/26/21
787
views
1
comment
0
David
Level 5
Question about the task
You can't have too much of a good thing
Java Syntax
,
Level 4
,
Lesson 10
Under discussion
Any idea where is the issue in my code?
[Failed] "The program should display the string N times." package com.codegym.task.task04.task0432; /* You can't have too much of a good thing */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here Bu
7/26/21
631
views
1
comment
0
NaTasia Madison
Level 8
Atlanta
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
Not understanding the arrays in the solution
Can someone explain step by step please.
7/26/21
457
views
0
comments
0
Liliane Top
Level 24
Amsterdam
Question about the task
Sequential file output
Java Core
,
Level 6
,
Lesson 13
Under discussion
3 questions about this task
1) // ReadFileInterface f = new ReadFileThread();// why do we have ReadFileInterface instead of ReadFileThread? ReadFileThread f = new ReadFileThread();//this makes more sense to me to use the reference datatype as ReadFileTRead instead of the interface. 2) This gives the same output as the
12/26/20
930
views
8
comments
0
The Chief
Level 18
Question about the task
Following a pattern
Java Core
,
Level 6
,
Lesson 13
Under discussion
Why is it necessary to switch the order of the last two lines in the 'true' block of the while loop?
I completed this task, but I still don't understand why the Thread.sleep line has to come before the 'if' statement in the 'true' block of the while loop in the CountUpRunnable class for the 2.5 seconds requirement to be met. private int countupIndex = 1; public void run() {
7/23/21
697
views
1
comment
0
hidden #10263621
Level 4
Question about the task
Maximum of four numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
What is wrong with this logic?
What is wrong with this logic?
9/20/18
2164
views
7
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
Let's make the code do something useful!
Java Syntax
,
Level 9
,
Lesson 11
Under discussion
3rd condition not passing
Been going over this one a bit, trying different things. Can't seem to figure it out. I checked other recent help questions but my code doesn't have exact same problem that the code in the other questions has.
7/23/21
1000
views
11
comments
0
Lawson
Level 29
Lagos
Question about the task
Following a pattern
Java Core
,
Level 6
,
Lesson 13
Resolved
Help
pls I've tried my best and its still not working
8/31/20
859
views
8
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
We're all friends here, even the exceptions
Java Syntax
,
Level 9
,
Lesson 8
Resolved
I don't understand what this task is asking for
I think I have the inheritance correct (it says to base it off of Task 2). It's the part about 2 checked and 2 unchecked I'm not following. Lesson 4 said the difference was basically the use of "throws" to designate which ones are checked and which are unchecked. I have specified that it throws two
7/21/21
962
views
3
comments
0
Andrei
Level 41
Question about the task
Find the class by its description
Java Collections
,
Level 6
,
Lesson 6
Resolved
I don't understand the solution. Why does it try to see if the clazz simple name is EmptyList ? What kind of class is this?
I don't understand line 8. public class Solution { public static void main(String[] args) { System.out.println(getExpectedClass()); } public static Class getExpectedClass() { for (Class clazz : Collections.class.getDeclaredClasses()){ if (clazz.getSimpleNam
7/21/21
669
views
5
comments
0
NaTasia Madison
Level 8
Atlanta
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
Can someone please help me? I'm stuck!
How to get the maximum without a method.
7/21/21
732
views
1
comment
0
Zach
Level 22
Fort Collins
Question about the task
UnsupportedFileName
Java Core
,
Level 8
,
Lesson 8
Under discussion
Not sure what is wrong with this...
Any help is appreciated.
7/20/21
668
views
1
comment
0
Zach
Level 22
Fort Collins
Question about the task
Shall we play?
Java Core
,
Level 6
,
Lesson 13
Resolved
Confused by the while loop??
while (!isWinnerFound) { } gamer1.interrupt(); gamer2.interrupt(); gamer3.interrupt(); } I am really confused about this code. It seems completely contrary to what I thought interrupt does. Wouldn't you want to call the interrupt method wh
7/17/21
702
views
1
comment
0
Zach
Level 22
Fort Collins
Question about the task
Snake (Part 11/20)
Games
,
Level 0
,
Lesson 1
Resolved
What's wrong??
My snake moves correctly when I push the arrow keys however the last tasks are not passing??
7/11/21
601
views
1
comment
0
BigRatBaby
Level 20
Washington
Question about the task
Task about algorithms
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Correct except for 1 element
So my code alphabetizes the array except for the word "Ten" which ends up at the top. Can anyone explain why to me? thanks in advance
7/19/21
766
views
8
comments
0
Fabian Andiel
Level 9
Vienna
Question about the task
Month number
Java Syntax
,
Level 8
,
Lesson 11
Under discussion
Pls help me
Hi guys, I tried numerous variants of this code especially with " quotation marks and without quotation marks for the last sentence! What is wrong? best regards Fabian
1/25/20
1389
views
2
comments
0
Dinesh
Level 7
Delhi
Question about the task
Day of the week
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
problem with scanner
When I tried to implement this stuff with scanner. why this is not working ?
5/28/20
901
views
3
comments
0
Zach
Level 22
Fort Collins
Question about the task
Space Invaders (Part 4/34)
Games
,
Level 0
,
Lesson 6
Under discussion
Not sure what is wrong here.
Any help is appreciated thanks.
7/18/21
522
views
1
comment
0
Daniel
Level 9
Vienna
Question about the task
HashSet of plants
Java Syntax
,
Level 8
,
Lesson 3
Resolved
REGARDING THE CONDITIONS. READ !!
First of all, you have to actually add all the words they wrote in the conditions, not any 10 words.Their english must be so bad they didn't think of specifying that. Second, don't try to create a an Array or ArrayList and then throw the words in the Set. That won't pass. People who wrote the condit
6/11/20
728
views
1
comment
0
Yusuf el Turki
Level 5
Rhein
Question about the task
Three numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
My Result is right but i dont understand why i got warning?
Why get i warning about it ? For example 9 2 9 result is 2 my programm does that. But i got warning.
6/2/21
669
views
2
comments
0
NNAMDI HENRY
Level 6
ABUJA
Question about the task
Three numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
MISSING RETURN STATEMENT.
please somebody should help! the compiler kept on issuing an error saying there is a missing return statement in my code. please help me and check it.
7/9/21
624
views
2
comments
0
Show more
1
...
66
67
68
69
70
...
374
Please enable JavaScript to continue using this application.