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 quests
All levels
Any status
Questions about tasks
Hot
Hannah Fadlon
Level 3
Question about the task
Implement the print method
Java Syntax
,
Level 2
,
Lesson 1
Under discussion
Why when I print s I get the wanted output?
I don't understand... We didn't make String s= "Java something something"; So we do I get that as me output? What am I missing here?
12.09.2021
609
views
3
comments
0
catalinene
Level 29
Greven
Question about the task
Shall we play?
Java Core
,
Level 6
,
Lesson 13
Under discussion
Ouput looks good but fails testing
Output: Smith Start game Jones Start game Gates Start game Gates Gather resources Smith Gather resources Gates Grow economy Gates Kill enemies Gates:won! Jones:lost! Smith:lost!
29.02.2020
1265
views
2
comments
0
J
Level 41
Wilson
Question about the task
Building a file
Java Core
,
Level 8
,
Lesson 11
Under discussion
Copying to new file
Why are the files not being copied and added to the new file?
11.09.2021
457
views
2
comments
0
NaeRae
Level 11
Question about the task
Greater than 10? You're not a good fit for us
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Why is the copy necessary?
I wanted to not make a copy of the set in the removeAllNumbersGreaterThan10 and do the method on the same set given to it. but it returns these errors: Exception in thread "main" java.util.ConcurrentModificationException at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1584) at
09.09.2021
379
views
3
comments
0
Nashid Kp
Level 2
Manjeri
Question about the task
Minimum of three numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
pls Explain
Can any one explain this part👇🏽pls int m1 = a < b ? a : b; int m2 = m1 < c? m1 : C;
10.09.2021
707
views
2
comments
0
Henk
Level 19
Pretoria
Question about the task
Method in a try-catch
Java Syntax
,
Level 9
,
Lesson 11
Resolved
not sure what's wrong ?
Please assist
06.05.2019
1807
views
5
comments
3
Cz Ferencz
Level 12
Bucharest
Question about the task
Multiplication table
Java Syntax
,
Level 4
,
Lesson 10
Under discussion
Initialization of variables
I can not state how important it is to initialize var just before while loop for next while loop. I had been working for at least 1 hour on this, to just realize, i should have not initialized both variables at the same time. Good luck out there.
04.12.2019
1920
views
3
comments
2
Indranil Chakraborty
Level 3
United Kingdom
Question about the task
Contract
Java Syntax
,
Level 1
,
Lesson 6
Under discussion
Please help I don’t get what I’m doing wrong
😑
23.08.2021
503
views
3
comments
0
Alicia Jackson
Level 1
Chico
Question about the task
No comments needed
Java Syntax
,
Level 0
,
Lesson 8
Under discussion
I don't get it...even after solving it.
I more or less understand my System.out.println(x); is 12, but I don't understand why System.out.println(y); is 2...it doesn't make sense at all.. what am I missing??
09.09.2021
548
views
1
comment
0
Vo
Level 41
Sofia
Question about the task
Sokoban (part 16)
Java Collections
,
Level 10
,
Lesson 15
New
Thread exception
Hello, From time to time I am getting thread exception (see below). It happens when running the code. If no exception is thrown, everything works as intended. Where did I go wrong? Thanks Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.codegym.task.task34.task3410
10.09.2021
425
views
0
comments
0
Björn
Level 1
Aachen
Question about the task
Dividing by zero
Java Syntax
,
Level 9
,
Lesson 11
Under discussion
still got an ArithmeticException... Why?
public static void main(String[] args) { try { divideByZero(); } catch (ArithmeticException e) { e.printStackTrace(); } }
14.04.2020
1024
views
1
comment
2
Gellert Varga
Level 23
Szekesfehervar
Question about the task
Pharmacy
Java Core
,
Level 7
,
Lesson 10
Under discussion
Is the 'volatile' keyword necessary in this task or not?
The requirements didn't say about this, but i changed these three variables to volatile: - static DrugController drugController (in Solution class) - static boolean isStopped (in Solution class) - static Map allDrugs (in DrugController class). My solution was accepted with these changes. Bu
08.09.2021
398
views
1
comment
0
Vitalina
Level 20
Question about the task
Notes
Java Core
,
Level 7
,
Lesson 2
Resolved
What's wrong?
Hi! AFter running my program it shows - "Time out. The program ran too long and was closed." But it seems that I did all conitions. so what's wrong? thanks in advance!
03.09.2021
440
views
2
comments
0
X Khan
Level 8
Palmdale
Question about the task
Flip the array
Java Syntax
,
Level 7
,
Lesson 4
Under discussion
The last two condition do no pass. But when I run it, it does exactly what's asked. What am I missing?
I was able to create an array of 10 numbers. Then I was able to allow for input of those 10 number from the keyboard. When I run the code in intelliJ it does what's asked in terms of displaying the numbers in reverse order, with each number on a new line. However, when I verify the solution/task th
07.09.2021
328
views
2
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
Consecutive threads
Java Core
,
Level 6
,
Lesson 13
Resolved
What do I apply .join() to?
We're supposed to .join() each created SleepingThread object. But this code actually does something completely different from any of the previous tasks and I'm not sure what to do in this case. Usually when we create a new Thread or something inheriting Thread, it's using syntax sort of like Threa
06.09.2021
573
views
3
comments
0
Matvey
Level 0
Under discussion
Müller-Lyer illusion in Java
I am taking an AP computer programming class and one of the codes I have to write is as follows, could someone please help me and write it because I am quite stuck, thank you: The Müller-Lyer illusion is caused by an image that consists of two parallel line segments. One line segment looks like an
07.09.2021
557
views
4
comments
0
Dinesh
Level 7
Delhi
Under discussion
Unable to print the default value of the char data type
class DefaultValues{ static boolean bl; static byte b; static short s; static int i; static long l; static float f; static double d; static char ch; static String str; public static void main(String[]args){ System.out.println("Default value of Boolean:->"+
06.09.2021
413
views
1
comment
0
user 2710
Level 4
Question about the task
Task with percentages
Java Syntax
,
Level 3
,
Lesson 3
Resolved
why 1.1?
i solve the task but i dont understand why return i * 1.1; how 1.1 How did you get 1.1 in detail?
05.09.2021
517
views
3
comments
0
user 2710
Level 4
Resolved
why is 17/100 not 0.17? result 0.0?
i writed double x = (17/100) * 888; return x . as a result 0.0 . why even if only x = 17/100 , will be as result 0.0 ? i already finished this task, but I am very interested in why this is so.
03.09.2021
339
views
2
comments
0
user 2710
Level 4
Question about the task
Multiplication table
Java Syntax
,
Level 3
,
Lesson 6
Under discussion
i did it!!!
without loops. like in task.
06.09.2021
569
views
3
comments
0
Zach
Level 22
Fort Collins
Question about the task
CRUD
Java Core
,
Level 7
,
Lesson 10
Under discussion
Can't get the last task to pass....
Any help is appreciated.
06.09.2021
513
views
3
comments
0
Zach
Level 22
Fort Collins
Question about the task
Clew
Java Core
,
Level 6
,
Lesson 13
Under discussion
Only Thread2 is passing at the moment....
Any help would be appreciated. Thanks in advance.
05.09.2021
373
views
1
comment
0
Zach
Level 22
Fort Collins
Question about the task
Clew
Java Core
,
Level 6
,
Lesson 13
Resolved
Static Threads??
Am I on the right track? Do you have to make the Threads static if you put them in a static block. Thanks in advance.
02.09.2021
735
views
2
comments
0
James
Level 41
Not in list
Question about the task
CashMachine (part 12)
Java Collections
,
Level 9
,
Lesson 15
Resolved
What's wrong here?
I've ran the program several times and it appears to pass all the task conditions but it will not verify. I eventually tried to use the model solution, but even that won't pass. Please help me figure out what's wrong.
12.06.2021
517
views
0
comments
0
Victor Omoha
Level 8
Raleigh
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Resolved
i need help with passing the 4th requirement
package com.codegym.task.task07.task0713; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /* Playing Javarella */ public class Solution { public static void main(String[] args) throws Exception { //write your code h
02.09.2021
423
views
2
comments
0
Zach
Level 22
Fort Collins
Question about the task
Sequential file output
Java Core
,
Level 6
,
Lesson 13
Under discussion
Not passing the 5th task
Not sure what I need to change. Any help is appreciated. Thanks in advance.
02.09.2021
478
views
1
comment
0
Zach
Level 22
Fort Collins
Question about the task
The early bird gets the worm
Java Core
,
Level 6
,
Lesson 13
Under discussion
I am probably overthinking this question....
Appreciate if you could point me in the right direction. Thanks in advance.
02.09.2021
515
views
2
comments
0
Zach
Level 22
Fort Collins
Question about the task
Snake (Part 17/20)
Games
,
Level 0
,
Lesson 1
Resolved
Why is the last task failing?
I am confused why my last task is not passing?
15.07.2021
373
views
1
comment
0
Zach
Level 22
Fort Collins
Question about the task
Racer (Part 5/28)
Games
,
Level 0
,
Lesson 5
Under discussion
Can't pass the second to last task??
I'm confused as to why they are using these values as well this.width = matrix[0].length; this.height = matrix.length;
01.09.2021
470
views
2
comments
0
Alexandru
Level 22
High Blantyre
Question about the task
Minesweeper (Part 7/16)
Games
,
Level 0
,
Lesson 0
Under discussion
Works in browser but not on PC
When I run it in browser it runs perfectly When I run it on my pc instead of numbers it displays some strange characters and it is not displaying the bomb icon. when it runs on pc I also get an error this displayed as some kind of error: 2021-08-26 11:37:50.661 java[7584:930059] CoreText note: C
26.08.2021
493
views
1
comment
0
Show more
1
...
58
59
60
61
62
...
371
Please enable JavaScript to continue using this application.