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
  • HaeWon Chung
    Level 17
    Boston
    Question about the task Player and Dancer
    Java Core, Level 4, Lesson 4
    Under discussion
    Something is wrongFirst of all, I have already passed the task so I can't really post my whole code. So I'm just posting original code for your reference. public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(Syst
    • 17.05.2020
    • 704views
    • 3comments
    0
  • Anitamalina
    Level 18
    København
    Question about the task Only for the rich
    Java Syntax, Level 8, Lesson 8
    Under discussion
    Iterator and removeHi guys, I'm a bit confused, when I iterate over a map, I understand that I can remove directly from that map, without a copy of them map.. but with by code, it doesn't seem to work - do I need a copy? or am I doing some other thing wrong ? :-)
    • 18.12.2020
    • 481views
    • 4comments
    0
  • Isma
    Level 41
    Madrid
    Question about the task ATM
    Java Core, Level 7, Lesson 10
    Under discussion
    Why do we need to synchronize deposit method?I understand that withdraw method will be used by more than one thread so it's compulsory to use synchronize on it. Why do we have to synchronize the deposit method while it will be used by only one thread (addMoney thread)?
    • 18.12.2020
    • 760views
    • 2comments
    0
  • Andrei
    Level 41
    Question about the task Consecutive threads
    Java Core, Level 6, Lesson 13
    Under discussion
    Why do I have to use new SleepingThread.join() and why can't I use, in the next line, SleepingThread.currentThread.join() or Thread.currentThread.join() ? I hate multithreading, it makes me feel like I have learned nothing so far in Java. Why can't I use : SleepingThread.currentThread.join() // or Thread.currentThread.join() public class Solution { public volatile static int COUNT = 4; public static void main(String[] args) throws Inte
    • 16.12.2020
    • 406views
    • 2comments
    0
  • Liliane Top
    Level 24
    Amsterdam
    Question about the task 2048 (Part 5/18)
    Games, Level 0, Lesson 2
    Resolved
    My program is working but fails the test why? private void createNewNumber() { while (true) { int x = getRandomNumber(SIDE); int y = getRandomNumber(SIDE); if (getCellNumber(x, y) == 0) { setCellNumber(x, y, getRandomNumber(10) == 9 ? 4 : 2); break; }
    • 18.12.2020
    • 441views
    • 2comments
    0
  • Liliane Top
    Level 24
    Amsterdam
    Question about the task Functionality is not enough!
    Java Syntax, Level 10, Lesson 11
    Resolved
    How to make it work with a scanner?I do get the the task to work with BufferedReader and tried to make it work with scanner but tried many things but keep getting ExceptionInputMismatch. Can someone please explain where I go wrong? Scanner scanner = new Scanner(System.in); HashMap map = new HashMap<>(); do { in
    • 18.12.2020
    • 488views
    • 5comments
    0
  • Anitamalina
    Level 18
    København
    Question about the task Kind Emma and the summer holidays
    Java Syntax, Level 8, Lesson 8
    Resolved
    map.remove won't workIn line 43, they key won't be removed from my hashMap - and I don't understand why? Can someone explain why? :)
    • 18.12.2020
    • 527views
    • 1comment
    0
  • Iqsaan Govender
    Level 10
    Durban
    Question about the task Minesweeper (Part 4/16)
    Games, Level 0, Lesson 0
    Under discussion
    Cannot see import and super classHi, Please assist, my Class on inteliJ cannot see the import and the super Class. Regards.
    • 07.08.2020
    • 693views
    • 1comment
    0
  • Josephine
    Level 26
    Normal
    Question about the task Calculating salaries
    Java Core, Level 9, Lesson 11
    Resolved
    why my last condition not passing?Please helpwhy my last condition not passing?Please help
    • 17.12.2020
    • 661views
    • 2comments
    0
  • gabe
    Level 6
    Greenville
    Question about the task Creating cats
    Java Syntax, Level 5, Lesson 9
    Resolved
    i did everything right, but it doesn't worki dunno what's wrong
    • 30.11.2020
    • 457views
    • 2comments
    0
  • Volodymyr
    Level 9
    L'viv
    Question about the task Sum of the digits of a three-digit number
    Java Syntax, Level 3, Lesson 12
    Under discussion
    What does it wants from me? HELP !!!I don't understand where is mistake... :(
    • 16.12.2020
    • 572views
    • 3comments
    0
  • Stanley Overby
    Level 0
    Under discussion
    Level 0, Lesson 3 package errori get a package does not exist error when i try to do the "I think being a programmer is cool lesson". At the top of the page is package com.codegym.task.task01.task0101; Is there a way to correct this or do i just continue? Here is a link to the task: https://codegym.cc/tasks/com.codegym.task.task0
    • 17.12.2020
    • 607views
    • 7comments
    0
  • LennyMan
    Level 25
    Lucca
    Question about the task Display numbers in reverse order
    Java Syntax, Level 7, Lesson 12
    Resolved
    Correct output, not validatedSo im wondering if ask for reverse order like: input: 2, 5,7,1,9 output: 9,7,2,1 ?????? because my output its just: 9 1 7 5 2
    • 16.12.2020
    • 538views
    • 4comments
    0
  • sourav bamotra
    Level 20
    jammu
    Question about the task Restaurant
    Java Core, Level 7, Lesson 10
    Resolved
    wellfrom the last level 16 with the introduction of threads the tasks now has become even more complex and long. Well i just wanted to know what is the best way adapted to read such a long multiple file programs. we Should go with main or move from one class to another .
    • 05.10.2020
    • 636views
    • 2comments
    0
  • Drazen Jankovic
    Level 11
    München
    Question about the task R or L
    Java Syntax, Level 7, Lesson 9
    Resolved
    Why is the second condition not met even though the "rose" string has been deleted?Why is the second condition not met even though the "rose" string has been deleted?
    • 16.12.2020
    • 451views
    • 2comments
    0
  • Dinesh
    Level 7
    Delhi
    Resolved
    Getter and Setter applied but not responding as required public class Cat{ private String name; private int age; private int weight; public Cat(String name, int age, int weight) { this.name = name; this.age = age; this.weight = weight; } public Cat() { } public void sayMeow() { System.out.println("M
    • 15.12.2020
    • 426views
    • 2comments
    0
  • Vinay
    Level 11
    Question about the task Cat relations
    Java Syntax, Level 6, Lesson 11
    Resolved
    Need help!!Last 4 conditions are not meeting :-(
    • 16.12.2020
    • 619views
    • 4comments
    0
  • Anthony Mack
    Level 1
    Waukesha
    Question about the task Number algorithms
    Java Core, Level 10, Lesson 10
    Under discussion
    I get the right answers when I run it without verification, but it still states that I may have an infinite loop. What?If I run my solution w/o verification it returns the arrays from the Solution input w/o a problem. However, whenever I run the validation, it states that it looks like I have an infinite loop. What gives?
    • 16.12.2020
    • 503views
    • 1comment
    0
  • Andrei
    Level 41
    Question about the task Thread.currentThread always returns the current thread
    Java Core, Level 6, Lesson 13
    Resolved
    Why is one of the answers main when we are starting a new thread? Name = Thread-0 Name = main Name = Thread-0 Name = main Name = main This is a version of the results I am getting when I run the program. I don't understand why it displays Name = main. After all, we are starting a new ThreadNamePrinter object named tnp which creates and starts a new thread ob
    • 16.12.2020
    • 542views
    • 3comments
    0
  • Bartosz
    Level 25
    Bialystok
    Question about the task Transactionality
    Java Core, Level 7, Lesson 10
    Under discussion
    Problem with taskI cannot see the problem here, it should work just fine
    • 23.04.2020
    • 1037views
    • 2comments
    1
  • Maxine Hammett
    Level 14
    San Diego
    Question about the task Rule of the triangle
    Java Syntax, Level 4, Lesson 4
    Under discussion
    Triangle with the specified sides cannot exist,I could use your help here. I don't understand why the if statement isn't triggered when all sides are equal.
    • 16.12.2020
    • 472views
    • 1comment
    0
  • Drazen Jankovic
    Level 11
    München
    Question about the task Somehow average
    Java Syntax, Level 4, Lesson 16
    Resolved
    Can someone please point me to a mistakeThe last condition is not met
    • 08.11.2020
    • 781views
    • 10comments
    0
  • Ian De Bie
    Level 28
    Austin
    Question about the task CRUD
    Java Core, Level 7, Lesson 10
    Resolved
    Seriously, I give up on this one, what is wrong with my code here?the 2 tests it is missing has these recommendations from mentor, that I don't really see where my code is doing this wrong. Be sure that the person is really added to the allPeople list. Be sure that the size of the allPeople list does not change when a person's data is updated.
    • 16.10.2020
    • 533views
    • 3comments
    1
  • Jakhongir Ruziev
    Level 23
    Tashkent
    Question about the task Shared list
    Java Core, Level 7, Lesson 10
    Resolved
    I get this: "All of the Solution class's methods, except for the main method, must be synchronized." Even if I did so. What am I missing?
    • 22.04.2020
    • 1316views
    • 3comments
    2
  • Cristian
    Level 13
    Ploiesti
    Question about the task Census
    Java Syntax, Level 8, Lesson 8
    Under discussion
    Something is wrong hereHi, guys! Something is wrong here. I don't know what is wrong. Please, help me! Thank you in advance! package com.codegym.task.task08.task0815; import java.util.HashMap; import java.util.HashSet; import java.util.*; /* Census */ public class Solution { public static HashMap createMap() {
    • 16.12.2020
    • 473views
    • 2comments
    0
  • MoJo
    Level 23
    Cairns
    Question about the task Threads and bytes
    Java Core, Level 8, Lesson 11
    Resolved
    I'm missing the "Then each thread must find the most frequently occurring byte in its file and add it to resultMap." part.Hi there, I'm to lazy to test this on test data. Can some1 glance over this and tell give me a hint. It's almost Christmas after all =P. Sorry for the missing comments in the code, i didn't think i'd have to ask for help on this one.
    • 13.12.2020
    • 593views
    • 7comments
    0
  • Marta
    Level 19
    Gdansk
    Question about the task Minesweeper (Part 13/16)
    Games, Level 0, Lesson 0
    Under discussion
    I've tried everything....and don't know what is wrong. I need second pair of eyes :) Please help
    • 03.12.2019
    • 1247views
    • 3comments
    0
  • LennyMan
    Level 25
    Lucca
    Question about the task Playing Javarella
    Java Syntax, Level 7, Lesson 9
    Resolved
    Its working correctly but not validate I dont know what i supposed to change for being validate
    • 15.12.2020
    • 517views
    • 4comments
    0
  • Satya Vath
    Level 31
    Vijayawada
    Question about the task Sorting bytes
    Java Core, Level 8, Lesson 3
    Resolved
    Please HelpThanks In Advance
    • 17.04.2019
    • 1380views
    • 3comments
    0
  • JESSE AITKEN
    Level 8
    Tampa
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Under discussion
    Why is my code failing?I'm not sure what is wrong?
    • 15.12.2020
    • 544views
    • 1comment
    0
  • 1
  • ...
  • 107
  • 108
  • 109
  • 110
  • 111
  • ...
  • 372
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Game Projects
  • 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 © 2025 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2025 CodeGym