Promotion
CodeGym University
Learning
Course
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
Greg Martel
Level 5
Under discussion
Solving w/ Math.floor(): what did I do wrong?
CodeGym tells me all conditions are met, save "if light is red, print "red" "... I'm pretty sure if (T+2) % 5 == 0 is yielding "yellow", then (T+1) % 5 == 0 should yield "red" no? Thanks so much for your help!
13.09.2021
400
views
1
comment
0
Whisper
Level 31
Question about the task
Correct order
Java Syntax
,
Level 7
,
Lesson 2
Under discussion
why is this not working
The code print the original array twice. The code works just fine under main methods, but it fail when it runs under reverseArray method
01.07.2022
388
views
2
comments
0
Matt.P.72
Level 26
Killen
Question about the task
Hexadecimal converter
Java Syntax
,
Level 9
,
Lesson 2
Under discussion
where is my mistake
public static String toHex(int decimalNumber) { if (decimalNumber <=0) return ""; int i=0; StringBuilder hex= new StringBuilder(); while ((int)(decimalNumber/Math.pow(16,i))>0)i++; int j=i-1; while (decimalNumber>0){ int a =
29.06.2022
349
views
1
comment
0
Fuad Teymurov
Level 3
Question about the task
Three numbers
Java Syntax
,
Level 3
,
Lesson 5
Resolved
Why this does not pass
Please, could someone explain why this does not pass while it works correct ?
29.06.2022
501
views
2
comments
0
Dennis
Level 4
Resolved
Download
Wie kann ich die ersten aufgaben machen wenn ich nichtmal ein programm habe wo ich es ausführen kann. Ich brauche den download
13.12.2020
805
views
2
comments
2
Fabian Andiel
Level 25
Vienna
Question about the task
Synchronized methods
Java Core
,
Level 7
,
Lesson 10
Under discussion
Solution but I don't understand! - Java Core Level 7, Lesson 10, exercise synchronised methods
Hi guys, I got 3 questions 1. Why is param a class variable? It doesn`t have the keyword static. 2.How do I know what is a shared ressource? 3. Why do need the methods 3,4,6 a synchronizsed? Many thanks in advance! Greetings Fabian
24.02.2020
1213
views
5
comments
2
Andre M.
Level 4
Glenn Dale
Question about the task
This age doesn't work for me…
Java Syntax
,
Level 3
,
Lesson 4
Under discussion
Unclear task requirement
Hello. The task requirement states "The Person class's adjustAge method should increase the Person's age by 20." The code for the adjustAge method has age = age+20. I am thinking that this is correct as the formula adds 20 from the passed in class variable. I tried multiplication 20* 20 and age =
16.12.2021
891
views
4
comments
0
Anonymous #11016365
Level 39
Detroit
Under discussion
Out class has access to private inner class fields?
How is it possible that the outer class is able to access the private instance variables of the inner class? In this example, how does the newNode instance have access to the private field value in the outer class method? Here are both classes: public class StringsLinkedList { public v
27.06.2022
232
views
1
comment
0
Anonymous #10798360
Level 8
Woking
Question about the task
Arithmetic mean
Java Syntax
,
Level 5
,
Lesson 5
Under discussion
I'd appreciate it if someone could help. I think I've done everything else right it's just that I'm stuck in an infinite loop.
package com.codegym.task.task05.task0507; /* Arithmetic mean */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int
26.06.2022
351
views
1
comment
0
Chawin Pathompornvivat
Level 0
Bellevue
Question about the task
Snake (Part 1/20)
Games
,
Level 0
,
Lesson 1
Under discussion
Stuck on: Game class method must be called with arguments in the initialize method
I believe I'm coding the solution to Part 1 right but it is saying I am not for one of the steps: The Game class's setScreenSize(int, int) method must be called with arguments (WIDTH, HEIGHT) in the initialize() method. What am I doing wrong? // organize class into package for CodeGym Games Snake
08.05.2020
1013
views
1
comment
0
Anonymous #11016365
Level 39
Detroit
Question about the task
Increments
Java Syntax
,
Level 9
,
Lesson 7
Under discussion
Prefix and Postfix operators in expressions
How does a++ + (--a * a++) evaluate to 12 but (--a * a++) evaluates to 4?
21.06.2022
417
views
1
comment
0
Maksim Krasnov
Level 47
Kyiv
Question about the task
Is anyone there?
Java Syntax
,
Level 6
,
Lesson 8
Resolved
error message: In the main(String[]) method, use a call to the Arrays.binarySearch(int[], int) method. Although i use Arrays.binarySearch(int[], int) ???
20.06.2022
320
views
3
comments
0
Anonymous #10798360
Level 8
Woking
Question about the task
Sorting three numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
I've tried all the conditions but somehow It's wrong. Can someone pls help me?
package com.codegym.task.task04.task0420; /* Sorting three numbers */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
18.06.2022
394
views
2
comments
0
Rakesh Kumar
Level 16
Gambat
Question about the task
Shared last names and first names
Java Syntax
,
Level 8
,
Lesson 11
Under discussion
Any one here?
package com.codegym.task.task08.task0821; import java.util.HashMap; import java.util.Map; import java.util.Scanner; /* Shared last names and first names */ public class Solution { public static void main(String[] args) { Map map = createPeopleList(); printPeopleList(map);
01.07.2019
1556
views
5
comments
0
Cec
Level 13
Resolved
Objects in an Array (of an Object)
hey, friends : ) after learning the basics of Objects, I wanted to try to make an own practice project, which should be simple but somehow I dont have the expected outcome what I got is: class team with this variable and function to create new agents public static agent[] members = new agent[3];
17.06.2022
453
views
6
comments
0
Anitamalina
Level 18
København
Question about the task
Functionality is not enough!
Java Syntax
,
Level 10
,
Lesson 11
Under discussion
I can't pass last requirement - maybe wrong order ?
Can someone help - I feel lost - and I don't why the output is in random order ? or if it is something else?
17.06.2022
240
views
1
comment
0
Anonymous #11014886
Level 3
Dover
Under discussion
Can I go through the course without paying for premium?
Is there a way to get through the AP Java Exam Lite course without paying for it? I got to Level 3 Lesson 4 and cannot go any further unless I pay for the premium.
15.06.2022
324
views
0
comments
0
J
Level 41
Wilson
Question about the task
HTML Editor (part 10)
Java Multithreading
,
Level 8
,
Lesson 15
Under discussion
Why am I getting an error for this?
I am getting fails on the first 3 tests of validation. Anyone know why? package com.codegym.task.task32.task3209.listeners; import com.codegym.task.task32.task3209.View; import javax.swing.*; import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; public class UndoMenuListe
13.06.2022
333
views
3
comments
0
LuisRC
Level 39
Gijón
Question about the task
Inverted words
Java Multithreading
,
Level 2
,
Lesson 9
Under discussion
Last condition fails
Hi there, Could I have some help why my code is failing last condition? Thanks
11.06.2022
324
views
2
comments
0
Anonymous #10971258
Level 1
Haikou
Question about the task
Minesweeper (Part 16/16)
Games
,
Level 0
,
Lesson 0
Under discussion
Where is main()?
I can run this successfuly,but I don't know where main() class is,could somebody tell me ?My code is below.😅 package com.codegym.games.minesweeper; import com.codegym.engine.cell.Color; import com.codegym.engine.cell.Game; import java.util.ArrayList; import java.util.List; public class Mineswee
05.06.2022
399
views
2
comments
0
Jaime Padilla
Level 20
Chandler
Question about the task
Remove duplicate strings
Java Syntax
,
Level 6
,
Lesson 4
Resolved
Can't pass second check and a bug?
The program seems to work. It will replace duplicates with null. Unless it refers to itself, then it continues. If I use Scanner.nextLine, it will end and display my results once I enter the 4th word, "Java". The only way I can enter more words is if I put something below it like a System.out.print
07.06.2022
616
views
8
comments
0
Jomar Tayactac
Level 5
Winnipeg
Question about the task
Make a word chain
Java Multithreading
,
Level 2
,
Lesson 9
Under discussion
Any insight would be greatly appreciated.
My code won't pass the last two requirements, please have a look at my code and let me know if you have any suggestions. Thanks!!
08.06.2022
458
views
1
comment
0
Surya
Level 33
Newark
Question about the task
Making the right conclusion
Java Core
,
Level 10
,
Lesson 10
Under discussion
I don't understand what I'm missing here. Need help
Could someone help me here. My output matches the requirement but one of the validation fails.
11.06.2020
731
views
1
comment
0
Sansho
Level 19
Bordeaux
Question about the task
Snake (Part 14/20)
Games
,
Level 0
,
Lesson 1
Under discussion
I don't understand why 4 and 5 are wrongs
For me, this bloc of code fullfill the conditions number 4 and 5: if (checkCollision(newHead)) isAlive = false; else { snakeParts.add(0, newHead); if (checkCollision(apple)) apple.isAlive = false; else
06.06.2022
303
views
1
comment
0
Angel Stefan
Level 23
Sibiu
Question about the task
Debug everything under the sun
Java Core
,
Level 6
,
Lesson 13
Resolved
I print the two lines but I don't use uncaughtEx() !?
How can i print the message of a method if that method is not used: "The program must use OurUncaughtExceptionHandler's uncaughtException method to display 2 messages."??? If i don't use this method() how i print to the console?
31.01.2022
536
views
5
comments
0
JD Obar
Level 7
Las Vegas
Under discussion
Why does my code results to NullPointerException
public class Solution { public static String[] strings; public static void main(String[] args) { //write your code here strings = new String[6]; String temp = "Somethig"; Scanner console = new Scanner(System.in); for (int x = 0; x < 6; x++) {
04.06.2022
212
views
1
comment
0
Tanja
Level 3
Question about the task
Snake (Part 20/20)
Games
,
Level 0
,
Lesson 1
Resolved
Aufgabe 17 gelöst, trotzdem fehlerhaft
Ich stelle meine Frage mal am Ende, damit ich nicht spoilere. Die Aufgabe 17 wurde als richtig erkannt (Apfel darf nicht innerhalb der Schlange existieren) und habe das Spiel auch zu Ende programmiert. Aber habe beim Testen festgestellt, dass der Apfel trotzdem innerhalb meiner Schlange erscheinen
02.06.2022
394
views
10
comments
0
Tasmoda
Level 28
Midrand
Question about the task
Minesweeper (Part 6/16)
Games
,
Level 0
,
Lesson 0
Under discussion
IntelliJ error for games tasks
Good day. Are the Games tasks not designed to work with IntelliJ? I get the error below.
01.06.2022
300
views
0
comments
0
Wojtek
Level 23
Solec-Zdroj
Question about the task
Clew
Java Core
,
Level 6
,
Lesson 13
Under discussion
What is wrong in my code?
need hint
28.02.2019
1418
views
9
comments
1
crispr_cast9
Level 9
Saint Petersburg
Question about the task
Logging stack traces
Java Syntax
,
Level 9
,
Lesson 2
Under discussion
Why is the strange result in validation?
My output: com.codegym.task.task09.task0906.Solution: main: In main method
01.06.2022
349
views
11
comments
0
Show more
1
...
36
37
38
39
40
...
366
Please enable JavaScript to continue using this application.