CodeGym
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
  • Darko Jakimovski
    Level 18
    Kriva Palanka
    Question about the task Creating threads recursively
    Java Core, Level 6, Lesson 13
    Resolved
    Can't see my mistakeI 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
    • 2016views
    • 6comments
    1
  • NOBODY
    Level 5
    Question about the task Initializing objects
    Java Syntax, Level 5, Lesson 7
    Under discussion
    still tryinganybody?
    • 10/27/20
    • 698views
    • 4comments
    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 passplease help
    • 7/28/21
    • 846views
    • 2comments
    0
  • Abdelrahman
    Level 5
    Amman
    Question about the task Initializing cats
    Java Syntax, Level 5, Lesson 7
    Under discussion
    helpI 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
    • 961views
    • 2comments
    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
    • 708views
    • 5comments
    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 oneI 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
    • 655views
    • 2comments
    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 referenceMy 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
    • 887views
    • 4comments
    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
    • 2755views
    • 13comments
    1
  • Evgen
    Level 23
    Question about the task Number algorithms
    Java Core, Level 10, Lesson 10
    New
    problem with output of Long.MAX_VALUEI 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
    • 618views
    • 0comments
    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
    • 787views
    • 1comment
    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
    • 631views
    • 1comment
    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 solutionCan someone explain step by step please.
    • 7/26/21
    • 457views
    • 0comments
    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 task1) // 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
    • 930views
    • 8comments
    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
    • 697views
    • 1comment
    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
    • 2164views
    • 7comments
    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 passingBeen 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
    • 1000views
    • 11comments
    0
  • Lawson
    Level 29
    Lagos
    Question about the task Following a pattern
    Java Core, Level 6, Lesson 13
    Resolved
    Helppls I've tried my best and its still not working
    • 8/31/20
    • 859views
    • 8comments
    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 forI 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
    • 962views
    • 3comments
    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
    • 669views
    • 5comments
    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
    • 732views
    • 1comment
    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
    • 668views
    • 1comment
    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
    • 702views
    • 1comment
    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
    • 601views
    • 1comment
    0
  • BigRatBaby
    Level 20
    Washington
    Question about the task Task about algorithms
    Java Syntax, Level 8, Lesson 11
    Resolved
    Correct except for 1 elementSo 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
    • 766views
    • 8comments
    0
  • Fabian Andiel
    Level 9
    Vienna
    Question about the task Month number
    Java Syntax, Level 8, Lesson 11
    Under discussion
    Pls help meHi 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
    • 1389views
    • 2comments
    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
    • 901views
    • 3comments
    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
    • 522views
    • 1comment
    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
    • 728views
    • 1comment
    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
    • 669views
    • 2comments
    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
    • 624views
    • 2comments
    0
  • 1
  • ...
  • 66
  • 67
  • 68
  • 69
  • 70
  • ...
  • 374
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym