CodeGym
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
  • 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
    • 323views
    • 9comments
    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
    • 573views
    • 3comments
    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
    • 437views
    • 5comments
    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
    • 298views
    • 2comments
    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
    • 1377views
    • 7comments
    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
    • 1131views
    • 3comments
    1
  • Joyonta Saha
    Level 31
    Question about the task GCD
    Java Core, Level 4, Lesson 8
    Resolved
    Exception throwing condition is not statisfyingNeed help!
    • 25.09.2018
    • 2462views
    • 10comments
    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 verificationCan 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
    • 293views
    • 1comment
    0
  • Jaime Padilla
    Level 20
    Chandler
    Question about the task Types of polygons
    Java Syntax, Level 14, Lesson 7
    Archived
    Broken TaskThis 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
    • 526views
    • 0comments
    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 validationMy 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
    • 580views
    • 6comments
    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
    • 415views
    • 1comment
    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
    • 226views
    • 1comment
    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
    • 897views
    • 2comments
    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
    • 434views
    • 1comment
    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 computerOutput 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
    • 1160views
    • 2comments
    2
  • Denis
    Level 22
    Kharkiv
    Question about the task Reinforce the adapter
    Java Core, Level 9, Lesson 3
    Under discussion
    Help me pls guysNeed help
    • 29.06.2019
    • 1739views
    • 3comments
    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 FIXEDHOW 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
    • 347views
    • 1comment
    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
    • 693views
    • 4comments
    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
    • 784views
    • 4comments
    1
  • dhanush
    Level 30
    Chennai
    Question about the task Introducing properties
    Java Core, Level 10, Lesson 2
    Resolved
    need helpDonno what is wrong!!
    • 03.10.2020
    • 620views
    • 5comments
    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
    • 677views
    • 5comments
    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
    • 587views
    • 2comments
    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 helphope it could help someone
    • 24.08.2020
    • 953views
    • 6comments
    2
  • tony
    Level 20
    Nis
    Question about the task Class counter
    Java Syntax, Level 6, Lesson 8
    Resolved
    What's wrongAny idea what's wrong here?
    • 27.11.2018
    • 2194views
    • 8comments
    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
    • 532views
    • 2comments
    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
    • 597views
    • 3comments
    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
    • 284views
    • 1comment
    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 spaceI don't know how to solve this error :((
    • 13.04.2023
    • 337views
    • 2comments
    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 explanationI 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
    • 418views
    • 4comments
    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
    • 352views
    • 2comments
    0
  • 1
  • ...
  • 24
  • 25
  • 26
  • 27
  • 28
  • ...
  • 372
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2025 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2025 CodeGym