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 courses
All quests
All levels
Any status
Questions about tasks
Hot
HaeWon Chung
Level 17
Boston
Question about the task
Player and Dancer
Java Core
,
Level 4
,
Lesson 4
Under discussion
Something is wrong
First 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
704
views
3
comments
0
Anitamalina
Level 18
København
Question about the task
Only for the rich
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Iterator and remove
Hi 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
481
views
4
comments
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
760
views
2
comments
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
406
views
2
comments
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
441
views
2
comments
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
488
views
5
comments
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 work
In line 43, they key won't be removed from my hashMap - and I don't understand why? Can someone explain why? :)
18.12.2020
527
views
1
comment
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 class
Hi, Please assist, my Class on inteliJ cannot see the import and the super Class. Regards.
07.08.2020
693
views
1
comment
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 help
why my last condition not passing?Please help
17.12.2020
661
views
2
comments
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 work
i dunno what's wrong
30.11.2020
457
views
2
comments
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
572
views
3
comments
0
Stanley Overby
Level 0
Under discussion
Level 0, Lesson 3 package error
i 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
607
views
7
comments
0
LennyMan
Level 25
Lucca
Question about the task
Display numbers in reverse order
Java Syntax
,
Level 7
,
Lesson 12
Resolved
Correct output, not validated
So 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
538
views
4
comments
0
sourav bamotra
Level 20
jammu
Question about the task
Restaurant
Java Core
,
Level 7
,
Lesson 10
Resolved
well
from 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
636
views
2
comments
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
451
views
2
comments
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
426
views
2
comments
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
619
views
4
comments
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
503
views
1
comment
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
542
views
3
comments
0
Bartosz
Level 25
Bialystok
Question about the task
Transactionality
Java Core
,
Level 7
,
Lesson 10
Under discussion
Problem with task
I cannot see the problem here, it should work just fine
23.04.2020
1037
views
2
comments
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
472
views
1
comment
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 mistake
The last condition is not met
08.11.2020
781
views
10
comments
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
533
views
3
comments
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
1316
views
3
comments
2
Cristian
Level 13
Ploiesti
Question about the task
Census
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Something is wrong here
Hi, 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
473
views
2
comments
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
593
views
7
comments
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
1247
views
3
comments
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
517
views
4
comments
0
Satya Vath
Level 31
Vijayawada
Question about the task
Sorting bytes
Java Core
,
Level 8
,
Lesson 3
Resolved
Please Help
Thanks In Advance
17.04.2019
1380
views
3
comments
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
544
views
1
comment
0
Show more
1
...
107
108
109
110
111
...
372
Please enable JavaScript to continue using this application.