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
Tessa Podbury
Level 18
Melbourne
Question about the task
Factory method pattern
Java Core
,
Level 6
,
Lesson 13
Under discussion
Last condition
Hey guys, confused because as far as I can tell, if null is passed it will revert to default in switch? Thanks!
09.06.2020
690
views
3
comments
0
Erik
Level 2
Allentown
Question about the task
Calculate the circumference of a circle
Java Syntax
,
Level 2
,
Lesson 2
Under discussion
Saying error on the first letter of radius why?????
package com.codegym.task.task01.task0129; /* Calculate the circumference of a circle */ public class Solution { public static void main(String[] args) { printCircleCircumference(5); double pi = 3.14; double C = 2*pi*radius; System.out.println(C); } pu
30.10.2018
1819
views
7
comments
0
Velociraptor
Level 3
Bangalore
Question about the task
Calculate the circumference of a circle
Java Syntax
,
Level 2
,
Lesson 2
Under discussion
guys the first condition is not satisfied can you please help me??
this is my code package com.codegym.task.task01.task0129; /* Calculate the circumference of a circle */ public class Solution { public static void main(String[] args) { printCircleCircumference(5); double pi = 3.14; printCircleCircumference(2 * 314* 5); } pu
24.07.2020
1051
views
4
comments
1
Richard Caputo
Level 16
United States of America
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Resolved
Why is this not working??
this condition is not passing: The program should display the maximum of the N entered numbers.
08.09.2021
396
views
2
comments
0
Richard Caputo
Level 16
United States of America
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Resolved
Anyone wanna tell me what I'm doing wrong here?
The code works as instructed (as far as I can tell)...
11.09.2021
401
views
1
comment
0
Richard Caputo
Level 16
United States of America
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Resolved
Got the output correct, but the method is confusing
Any suggestions on how to move the loops to the printList method?
12.09.2021
875
views
1
comment
0
Richard Caputo
Level 16
United States of America
Question about the task
Min and max in arrays
Java Syntax
,
Level 7
,
Lesson 12
Resolved
Anyone??
The output is correct... isn't it?
12.09.2021
431
views
2
comments
0
Greg Martel
Level 5
Question about the task
Maximum of four numbers
Java Syntax
,
Level 4
,
Lesson 6
Resolved
What gives?
I've been racking my head for 30 minutes trying to find a combination which fails this Solution. Could someone please give me a hint as to where I went wrong? Thanks so much!
16.09.2021
403
views
2
comments
0
Ahmed Mujtaba Butt
Level 0
Question about the task
2048 (Part 7/18)
Games
,
Level 0
,
Lesson 2
Resolved
Solution not Passing
It seems to me that I have written the correct solution but it isn't letting me pass through. private boolean compressRow(int[] row) { int[] newRow = {0, 0, 0, 0}; int i = 0; for (int x = 0; x < 4; x++) { while (row[x] != 0 && i < 4) {
07.09.2021
783
views
4
comments
0
Ahmed Mujtaba Butt
Level 0
Question about the task
2048 (Part 18/18)
Games
,
Level 0
,
Lesson 2
Under discussion
Run 2048 in NetBeans 7.4
I have written the code for 2048 now I want to run it in NetBeans IDE 7.4. Is it possible?
15.09.2021
378
views
1
comment
0
Christophsnz
Level 9
Germany
Question about the task
Minesweeper (Part 13/16)
Games
,
Level 0
,
Lesson 0
Under discussion
Requirement 6. is not matching
Can anyone help me out here? i can't see the problem
30.08.2021
647
views
1
comment
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
Shall we play?
Java Core
,
Level 6
,
Lesson 13
Resolved
Hm, not working for first and third conditions
My results when the code is run: 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 One thing I wasn't sure if is if we're supposed to sleep before a line is printed or after, but it
13.09.2021
569
views
3
comments
0
Nandini
Level 3
United States of America
Question about the task
Minimum of four numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
can anyone help me
package com.codegym.task.task02.task0217; /* Minimum of four numbers */ public class Solution { public static int min(int a, int b, int c, int d) { //write your code here int e = min( a, b); if((a<=b) && (a<=c) && (a<=d)) {
13.09.2021
360
views
1
comment
0
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
603
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
1255
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
448
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
370
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
697
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
1793
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
1910
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
491
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
536
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
418
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
1005
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
390
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
431
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
323
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
563
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
544
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
405
views
1
comment
0
Show more
1
...
57
58
59
60
61
...
371
Please enable JavaScript to continue using this application.