CodeGym
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
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    About null-referenceFrom https://codegym.cc/quests/lectures/questcore.level05.lecture03 : "In the second case, there won't be any compilation errors and void print(String s) will be called, which is somewhat not obvious: public class Cat { public static void print(Object o) { System.out.println(o);
    • 3/7/21
    • 799views
    • 4comments
    0
  • Vincenzo Seggio
    Level 28
    Question about the task MVC (part 8)
    Java Multithreading, Level 4, Lesson 14
    Resolved
    Where ist the mistake?I do not understand what the validator means with the recommendation The main method's output must include the deleted user (user id 124L) in the "All deleted users" section. Could you help me please?
    • 3/7/21
    • 716views
    • 1comment
    0
  • John
    Level 17
    Mansfield
    Question about the task Drawing a rectangle
    Java Syntax, Level 4, Lesson 13
    Under discussion
    (try this out this is working but not accepted in this exercise idk why)import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader br = new BufferedReader (new InputStreamReader (System.in)); int m = Integer.parseInt(br.readLine()); int n = Integer.parseInt(br.readLine()); for(
    • 3/7/21
    • 645views
    • 1comment
    0
  • Alexandre Lalancette
    Level 41
    Quebec
    Question about the task Caching
    Java Collections, Level 4, Lesson 8
    Under discussion
    Anyone solved this?I really don't understand what needs to be done here. Did someone successfully solved this?
    • 2/5/20
    • 1396views
    • 4comments
    2
  • Mina Nabil
    Level 17
    Sydney
    Question about the task Robot wars
    Java Core, Level 3, Lesson 11
    Resolved
    Hi, whats wrong with my code? please helpHi, whats wrong with my code? please help
    • 3/4/21
    • 643views
    • 5comments
    0
  • Max
    Level 5
    Stamford
    Question about the task Drawing a rectangle
    Java Syntax, Level 4, Lesson 13
    Resolved
    I need help to find the errorI got the characters printed out but not the new line. Need help
    • 2/13/21
    • 640views
    • 2comments
    0
  • Mina Nabil
    Level 17
    Sydney
    Question about the task Fix four mistakes
    Java Core, Level 4, Lesson 8
    Under discussion
    Quick question please answerJust a quick question, when we call the initList(list) on the list parameter, that means that we change the list permanently right ? as when I debug the program, printListValues(list); and processCastObjects(list); get null list as if the initList did not affect the list variable public static void
    • 3/5/21
    • 803views
    • 6comments
    0
  • Anatoly
    Level 17
    Question about the task Countdown at the races
    Java Core, Level 6, Lesson 10
    Under discussion
    Does anyone can tell me what is wrong with that?Everything is working with 4 and with 3. But Validator doesn't want to accepting it... is anything wrong with that? Any explanation will help.. package com.codegym.task.task16.task1617; /* Countdown at the races */ public class Solution { public static volatile int numSeconds = 3; publ
    • 3/5/21
    • 533views
    • 2comments
    0
  • Liliane Top
    Level 24
    Amsterdam
    Question about the task Reading and writing to a file: CodeGym
    Java Core, Level 10, Lesson 2
    Under discussion
    Miracle!! I pass the test but the console shows an error.1)Something is wrong with my code as it doesn't always save the users to the file. 2) Sometimes it gives an illegalArgumentException due to the new Date(). 3) It also doesn't work when I try to store all users in the StringBuilder and then write it to the file. This part is also confusing. How is th
    • 1/15/21
    • 684views
    • 0comments
    0
  • WIDMO
    Level 25
    Gdańsk
    Question about the task Number algorithms
    Java Core, Level 10, Lesson 10
    Under discussion
    Anyone can help?After few hours on that I have to pass. Can anybody tell me what's wrong with my solution, apart that it simply do not pass? Please. Thanks in advance.
    • 12/23/20
    • 675views
    • 0comments
    0
  • Josephine
    Level 1
    Normal
    Question about the task AutoCloseable and try-with-resources
    Java Multithreading, Level 1, Lesson 10
    Resolved
    Can someone explain what is this error? I am stuckom/codegym/task/task21/task2112/Solution.java:6: error: incompatible types: try-with-resources not applicable to variable type try (FakeConnection fakeConnection = dbConnectionManager.getFakeConnection()) ^ (com.codegym.task.task21.task2112.FakeConnection cann
    • 3/4/21
    • 1530views
    • 2comments
    0
  • Oliver Heintz
    Level 18
    Mustang
    Question about the task Transactionality
    Java Core, Level 7, Lesson 10
    Resolved
    I've never really understood reading files from console I assume I am failing for writing my own shoddy method (fileAdd) and trying to be clever. But I'm not sure why it doesn't work. And my brain has been pummeled by these tasks already, so I'm gonna need some help on this one.
    • 3/1/21
    • 669views
    • 10comments
    0
  • Michał
    Level 41
    Krakow
    Question about the task Inverted words
    Java Multithreading, Level 2, Lesson 9
    Under discussion
    Where's a mistake?Hi, could anyone please help me with that? I don't know what is wrong with my solution. It passes all my examples. Though, I clearly miss something.
    • 9/18/20
    • 578views
    • 3comments
    0
  • Johannes
    Level 27
    Centurion, Pretoria
    Question about the task Inverted words
    Java Multithreading, Level 2, Lesson 9
    Under discussion
    I give up.I have spent literally the WHOLE day on this task. And still cannot pass. How should I tell the "list" that it should allow another occurrence of the same words ? Moving on. No need to frustrate myself further with this task.
    • 4/28/20
    • 1060views
    • 1comment
    0
  • Andrei
    Level 41
    Question about the task Deserialization
    Java Core, Level 10, Lesson 10
    Resolved
    Please break down this codeThree of the requirements are: The getOriginalObject method must return the A object received from the ObjectInputStream. The getOriginalObject method must return null if an A object is not received during deserialization attempts. The getOriginalObject method must return null if an exception is th
    • 2/26/21
    • 922views
    • 7comments
    0
  • Zach
    Level 22
    Fort Collins
    Question about the task Player and Dancer
    Java Core, Level 4, Lesson 4
    Under discussion
    Static variables are so confusing...I am so confused about static variables and why this doesn't work. If someone could explain it to me I would be super grateful. Thanks. package com.codegym.task.task14.task1407; import java.io.BufferedReader; import java.io.InputStreamReader; /* Player and Dancer */ public class Solution {
    • 3/2/21
    • 912views
    • 2comments
    0
  • Aleksandr
    Level 22
    Moscow
    Question about the task John Johnson
    Java Core, Level 9, Lesson 11
    Resolved
    Help pleaseI don`t know what is wrong, i tried to crash it with space before name, after name, different dates, but all works fine and not pass the name test. Can someone help please, with figuer out what i miss?
    • 3/5/21
    • 600views
    • 1comment
    0
  • Ryan Palmer
    Level 20
    Philadelphia
    Question about the task Ten cats
    Java Syntax, Level 9, Lesson 11
    Resolved
    Question about the cat classI feel like I understand the other pieces of this task, but I was curious about the class. Can someone explain what the second two sections are doing? public static class Cat { private String name; public Cat(String name) { this.name = name; } public
    • 3/4/21
    • 856views
    • 3comments
    0
  • Павел Артеменко
    Level 41
    Krasnodar
    Question about the task Let's make the code do something useful!
    Java Syntax, Level 9, Lesson 11
    Resolved
    Please, help.Tested in IDEA with both exist and nonexist input file names, test passed ok. Somehow it failed to pass verification.
    • 4/17/19
    • 2121views
    • 3comments
    1
  • Andrei
    Level 41
    Question about the task The code won't compile…
    Java Syntax, Level 9, Lesson 11
    Under discussion
    Code exactly like in the solution provided, it doesn't compile and it says there is an infinite loop. What is going on?I don't know what's going on, my code is the same as the solution's yet it won't compile.
    • 11/16/20
    • 630views
    • 6comments
    0
  • Mina Nabil
    Level 17
    Sydney
    Question about the task Fix four mistakes
    Java Core, Level 4, Lesson 8
    Under discussion
    Hi, why its not working ?Hi, why its not working ?
    • 3/4/21
    • 596views
    • 1comment
    0
  • Anatoly
    Level 17
    Question about the task Stopwatch
    Java Core, Level 6, Lesson 7
    Under discussion
    Why if-else not passing Validator?Can anybody explain why if-else do not passing validator? I do understand it might have less code with Thread.Sleep(1000\owner.getSpeed() But if-else is also looking like correct decision, so what is wrong with that? Any extra explanaition will help,thanks in advance...
    • 3/4/21
    • 543views
    • 2comments
    0
  • Anatoly
    Level 17
    Question about the task Reading a file
    Java Core, Level 3, Lesson 11
    Archived
    Who can explain?I did the solution with the help of the new feature "download correct solution". Who can explain how it works and what it doing? I tried to run that code in Idea, but there is nothing coming out to console,despite it passing validator - i am stil not fully understand what it doing. Even debuging did
    • 2/22/21
    • 715views
    • 3comments
    0
  • Drzazgen
    Level 8
    Warsaw
    Question about the task Min and max in arrays
    Java Syntax, Level 7, Lesson 12
    Resolved
    Why I can't find max and min? On output i got min and max but sill is one requirements not meet.
    • 2/26/21
    • 970views
    • 6comments
    0
  • Libby
    Level 2
    Question about the task GCD
    Java Core, Level 4, Lesson 8
    Resolved
    I don't see why my code is not verifying correctly.an exception is thrown if my entered number is 0 or less, and the GCD is right for any values I put in. Can anyone point out my mistake? thank you.
    • 3/4/21
    • 1082views
    • 3comments
    0
  • Anthony Chalk
    Level 30
    London
    Question about the task Arming ourselves to the teeth!
    Java Multithreading, Level 5, Lesson 9
    Resolved
    Please helpOn line 24 I get the warning: Contents of StringBuilder 'replacement' are updated, but never queried On line 26 I get the warning: Result of 'String.replaceAll()' is ignored Why?
    • 3/4/21
    • 830views
    • 3comments
    0
  • Jurij Thmsn
    Level 29
    Flensburg
    Question about the task GCD
    Java Core, Level 4, Lesson 8
    Resolved
    first and third requirement not metIt seems to run - I enter 2 lines on the keyboard and if they are not positive integers, an Exception is thrown - otherwise the GCD is displayed. I am really stuck on this - did I misunderstand the requirements?
    • 3/1/21
    • 730views
    • 8comments
    0
  • Dev
    Level 5
    Abuja
    Question about the task Sorting three numbers
    Java Syntax, Level 4, Lesson 6
    Resolved
    Descending OrderI tried running this code on a PC and it works fine. Why doesn't it work on Codegym? It keeps giving me an error message for Arrays.sort(arr);
    • 2/22/21
    • 877views
    • 1comment
    0
  • Nirake_
    Level 8
    Mumbai
    Question about the task Square of a number
    Java Syntax, Level 1, Lesson 8
    Under discussion
    Cant understand it??
    • 5/14/20
    • 929views
    • 4comments
    0
  • Vatsal Patel
    Level 15
    Naperville
    Question about the task Minimum of N numbers
    Java Syntax, Level 8, Lesson 11
    Under discussion
    What am I doing wrong?I am reading from the keyboard to get the N number. Then reading line N times.
    • 5/4/19
    • 1737views
    • 4comments
    0
  • 1
  • ...
  • 84
  • 85
  • 86
  • 87
  • 88
  • ...
  • 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