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
matemate123
Level 50
Kraków
Question about the task
A wise man thinks once before speaking twice
Java Multithreading
,
Level 6
,
Lesson 8
Resolved
What's the difference between these options?"
public synchronized int getSumOfVar1AndVar2() { return var1 + var2; } public int getSumOfVar1AndVar2() { synchronized (this) { return var1 + var2; } } Object obj = new Object(); public int getSumOfVar1AndVar2() { synchronized (obj) { return var1 + var2; } }
14.05.2023
323
views
9
comments
0
MoJo
Level 23
Cairns
Question about the task
Your own FileWriter
Java Core
,
Level 9
,
Lesson 11
Resolved
Is five something different here than in my timeline?
I´m pretty sure that's five constructors, so what's the deal here. When i compared it to the given Solution it is pretty much the same too, just with some different calls to print the lines but results the same. Anyone got a clue?
13.01.2021
573
views
3
comments
0
matemate123
Level 50
Kraków
Question about the task
Those who love work need no entertainment
Java Multithreading
,
Level 6
,
Lesson 5
Under discussion
Little question about shutdownNow() and awaitTermination() method in this task
public synchronized void stop() throws InterruptedException { try { saveUnprocessedUrls(executorService.shutdownNow()); if (executorService.awaitTermination(1_000, TimeUnit.MILLISECONDS)) { saveUnprocessedUrls(getCancelledTasksFromExecutor());
13.05.2023
437
views
5
comments
0
Amo programmare
Level 32
Question about the task
2048 (Part 7/18)
Games
,
Level 0
,
Lesson 2
Resolved
Unable to pass last condition.
Hi All, I've tried testing my solution and it seems to work, but it doesn't pass the last requirment. When I test it, it accuratelt gives me false or true based on wheter or not the array has changedd Maybe if you could help me figure out what I'm doing wrong. I would really appreciate it.
12.05.2023
298
views
2
comments
0
ddi
Level 18
Dortmund
Question about the task
Thread.currentThread always returns the current thread
Java Core
,
Level 6
,
Lesson 13
Resolved
Where should i put the thread.sleep(10)?
I have put in line 31 Thread.sleep(10) but it doenst pass the validation.. where should i put it?
21.09.2019
1377
views
7
comments
1
Thomas
Level 13
Scottsdale
Under discussion
Help --- Currency exchange --- code is trash ... unsure & stuck
public static void main(String[] args) { // main method must call the convertEurToUsd method twice with any arguments. large = convertEurToUsd (50, 1.10); small = convertEurToUsd (10, 1.20); return convertEurToUsd; System.out.println(large); System.out
19.05.2019
1131
views
3
comments
1
Joyonta Saha
Level 31
Question about the task
GCD
Java Core
,
Level 4
,
Lesson 8
Resolved
Exception throwing condition is not statisfying
Need help!
25.09.2018
2462
views
10
comments
0
Tamba Denis Valentin
Level 22
Bacau
Question about the task
Octal converter
Java Syntax
,
Level 9
,
Lesson 2
Under discussion
Doesn't pass the verification
Can somebody tell my why this code doesn't pass? I know the values aren't right but I followed the algorithm and I don't understand where is the mistake.
09.05.2023
293
views
1
comment
0
Jaime Padilla
Level 20
Chandler
Question about the task
Types of polygons
Java Syntax
,
Level 14
,
Lesson 7
Archived
Broken Task
This task is broken as well. This code completely works as asked, but the method has a different name than what is required to pass. This task will not pass unless you match the method name they use in their solution, which is" getShapeNameByCountOfCorners" instead of the default get "ShapeNameByCo
07.08.2022
526
views
0
comments
2
Justin Smith
Level 41
Greenfield, USA
Question about the task
Fill 'er up
Java Collections
,
Level 9
,
Lesson 9
Under discussion
Won't pass validation
My approach to this was to create a Pixel class (so that I have an object that stores both an x and y coordinate), and add and remove Pixel objects from ArrayLists. The general process is like this: 1. Maintain an ArrayList of Pixel objects that are confirmed to be changing color called pixelsToChan
04.05.2023
580
views
6
comments
0
Dave Andrea
Level 41
Question about the task
Stairs
Java Collections
,
Level 9
,
Lesson 9
Under discussion
Can someone explain what the question is asking?
I think I am picturing the situation in this task incorrectly. The validator claims I'm wrong, and the other 2 people asking questions in the help section have answers that are not only completely different than mine, but I also can't make sense of them based on how I am picturing this in my mind.
02.10.2020
415
views
1
comment
0
youssef hamed
Level 2
egy
Under discussion
connect java to sql
if I have a html, css and js website which I want to connect to sql how can I make it happen using java
02.05.2023
226
views
1
comment
0
Name
Level 14
Question about the task
The isomorphs are coming
Java Core
,
Level 2
,
Lesson 12
Under discussion
Where is the problem?
I see two methods: main and getMinimumAndIndex. What's wrong?
10.04.2020
897
views
2
comments
1
Papa's Playhouse
Level 3
United States of America
Question about the task
Count the number of cats
Java Syntax
,
Level 3
,
Lesson 5
Under discussion
trying to understand the question so i can figure out the answer. Just not sure. don't need to use .this because its all public. Kinda lost here.
Really lost in this assignment. I am a big guesser. So i just keep typing code till something sticks. This is not good. Not sure how to assign and what i am assigning anything to. I tried going back to the beginning lessons and try starting all over, but for some reason once you complete a task,
01.05.2023
434
views
1
comment
0
catalinene
Level 29
Greven
Question about the task
Counting words
Java Core
,
Level 9
,
Lesson 5
Under discussion
Output looks good with a local file on computer
Output looks good with a local file on my computer, fails the last condition unfortunately. Recommendation says it counts more instances of the word "world". Why or how?
14.03.2020
1160
views
2
comments
2
Denis
Level 22
Kharkiv
Question about the task
Reinforce the adapter
Java Core
,
Level 9
,
Lesson 3
Under discussion
Help me pls guys
Need help
29.06.2019
1739
views
3
comments
0
Lee Yung
Level 1
Question about the task
2048 (Part 4/18)
Games
,
Level 0
,
Lesson 2
Under discussion
HOW I GOT MY BROKEN MARRIAGE FIXED UP AGAIN CHOOSING DR GBOGBO AS MY LAST OPTION OF WHICH I DIDN'T REGRET BECAUSE HE GOT MY MARRIAGE FIXED
HOW I GOT MY BROKEN MARRIAGE FIXED UP AGAIN CHOOSING DR GBOGBO AS MY LAST OPTION OF WHICH I DIDN'T REGRET BECAUSE HE GOT MY MARRIAGE FIXED Email: Drgbogbospellcaster@gmail.com Whatsapp: +234 703 166 3661 This testimony is about the good work of Dr Gbogbo who fixed my broken marriage.
03.04.2023
347
views
1
comment
0
Angel Stefan Arjoca
Level 26
Bucharest
Question about the task
Yet another adapter
Java Core
,
Level 9
,
Lesson 3
Resolved
how can i save the date???
Pls, hint with explanation, tk you! :)
27.08.2020
693
views
4
comments
0
Maria
Level 22
Moscow
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Resolved
I dont understands how to fing max w/o arrays...
Help
22.10.2020
784
views
4
comments
1
dhanush
Level 30
Chennai
Question about the task
Introducing properties
Java Core
,
Level 10
,
Lesson 2
Resolved
need help
Donno what is wrong!!
03.10.2020
620
views
5
comments
1
Maryem Vickers
Level 7
HT...
Question about the task
Distance between two points
Java Syntax
,
Level 6
,
Lesson 8
Under discussion
How do I do this?!
I can't figure out how to find a distance between the co-ordinations. Code: (it won't allow me to share it...) package com.codegym.task.task06.task0609; /* Distance between two points */ public class Util { public static double getDistance(int x1, int y1, int x2, int y2) { //write
25.09.2020
677
views
5
comments
0
Angel Stefan Arjoca
Level 26
Bucharest
Question about the task
Reading and writing static fields to a file
Java Core
,
Level 10
,
Lesson 2
Under discussion
Not passing first conditions!
Any hint? I have no idea what to do next... all i did is to replicate the model from the lesson and is not working. Tk you!
31.08.2020
587
views
2
comments
0
Matthew Max
Level 29
Giza
Question about the task
Rectangle algorithms
Java Core
,
Level 10
,
Lesson 10
Under discussion
This is my solution if it can help
hope it could help someone
24.08.2020
953
views
6
comments
2
tony
Level 20
Nis
Question about the task
Class counter
Java Syntax
,
Level 6
,
Lesson 8
Resolved
What's wrong
Any idea what's wrong here?
27.11.2018
2194
views
8
comments
0
Anonymous #10987379
Level 22
Question about the task
Binary to hexadecimal converter
Java Syntax
,
Level 9
,
Lesson 2
Resolved
What is going wrong in my toBinary(String) method?
I have tested it with various online calculators, and it seems to output the correct solution. Additionally, I looked through the other questions pertaining to this task, but I must be missing something because I cannot figure out where I am going wrong. Any help, even if it is just an input that do
04.06.2022
532
views
2
comments
1
Isma
Level 41
Madrid
Under discussion
IntelliJ shows you need the CodeGymTasks project to continue. Download it?
I've been working in the same project since the first level. When I download the project it's empty as if any of the tasks had been completed. How can I fix this issue?
21.01.2021
597
views
3
comments
3
Willi Ehrmann
Level 37
Question about the task
Word search
Java Core
,
Level 10
,
Lesson 10
Under discussion
Code works but last Condition is not validating? I checked for a lot of cases and didn't find an error so far. plz help.
import java.util.ArrayList; import java.util.List; /* Word search */ public class Solution { public static void main(String[] args) { // int[][] wordSearch = new int[][]{ // {'f', 'd', 'e', 'r', 'l', 'k'}, // {'u', 's', 'a', 'm', 'e', 'o'}, //
21.04.2023
284
views
1
comment
0
Anonymous #11100313
Level 24
Question about the task
R or L
Java Syntax
,
Level 13
,
Lesson 5
Resolved
Please help I keep getting OutOfMemoryError: Java heap space
I don't know how to solve this error :((
13.04.2023
337
views
2
comments
0
matemate123
Level 50
Kraków
Question about the task
Knowledge is power!
Java Multithreading
,
Level 4
,
Lesson 9
Resolved
Guys I need a little explanation
I read today a little code with MessageFormat and Choice format class but my mind got a little confusion. I haven't enough understanding what's going on, and why in situation in this task in printStocks method. I had IllegalArgumentException, I had to add one "null" to Format[] testFormats = {null,
17.04.2023
418
views
4
comments
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
Conscription
Java Syntax
,
Level 3
,
Lesson 3
Under discussion
Solution
Scanner scanner = new Scanner(System.in); String name = scanner.nextLine(); int age = scanner.nextInt(); if (age >= 18) { if (age <= 28) { System.out.println(name + militaryCommissar); } } }
19.02.2023
352
views
2
comments
0
Show more
1
...
24
25
26
27
28
...
372
Please enable JavaScript to continue using this application.