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
  • Gera
    Level 3
    Hamburg
    Under discussion
    Was ist falsch? Die Methode gibt doch die kleinste Zahl aus?package de.codegym.task.task02.task0216; /* Die kleinste aus drei Zahlen */ public class Solution { public static int min(int a, int b, int c) { int m = 0; if ((a < b) && (a < c)) m = a; else if ((b < a) && (b < c)
    • 06.05.2021
    • 478views
    • 2comments
    0
  • Xavier
    Level 17
    Pearland
    Question about the task Making the top ten
    Java Core, Level 2, Lesson 12
    Resolved
    It seems like it should work.According to everything I read about overloading, this should work, but the validation claims that the transformValue method is not doubling the number when it is, and that the main method should only call transformValue once, which it does.
    • 06.05.2021
    • 590views
    • 3comments
    0
  • Dwight Burrow
    Level 3
    Minnetonka
    Question about the task Family relations
    Java Syntax, Level 2, Lesson 2
    Under discussion
    A bit of an explanation?The husband and wife part I wouldn't be able to understand myself. I have two questions: Q1. Is woman.husband = man; the same as: public static class Woman { public Man husband = man; } Q2. Will I learn more about this later?
    • 06.05.2021
    • 660views
    • 2comments
    0
  • Pahunchik
    Level 8
    Moscow
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Under discussion
    Why can't it pass the test?My program works and shows the maximum number of N numbers. Why can't it pass 5th point of the test?
    • 22.04.2021
    • 572views
    • 2comments
    0
  • Yunus Can
    Level 2
    Under discussion
    Premium ja oder Nein ? Lohnt sich die Premium version ? sie ist gerade im angebot für 90 euro
    • 04.04.2021
    • 675views
    • 2comments
    0
  • Andrei
    Level 41
    Question about the task Read online about the median of a sample
    Java Multithreading, Level 6, Lesson 2
    Resolved
    I don't understand the logic of the mentor's solution.Why does he multiply v1 and v2 with themselves and then multiply the result by 100? public static Integer[] sort(Integer[] array) { final double mediana = getMediana(array); Arrays.sort(array, new Comparator() { @Override public int compare(Integer o1, Inte
    • 04.05.2021
    • 666views
    • 5comments
    0
  • ImDevin
    Level 15
    Old Town
    Resolved
    Hi all, a short question regarding outputs in intellij, in generalJust a quick question about being able to see an output from the tasks. As an example, when I passed the task 0820, Animal Set, the output doesn't show anything in intellij, even though the code has System.out.println(object); in the printPets method. I'd like to be able to see the output for the
    • 02.05.2021
    • 677views
    • 4comments
    0
  • Chris
    Level 19
    Newark
    Question about the task R or L
    Java Syntax, Level 7, Lesson 9
    Under discussion
    Im getting the right answer when printed to the console window.I was finally able to get the example output result in the exercise but it is still denying me a passing mark on two categories. Can someone please help me understand what I am doing wrong here?
    • 03.05.2021
    • 547views
    • 2comments
    0
  • John
    Level 17
    Mansfield
    Question about the task Task about algorithms
    Java Syntax, Level 9, Lesson 11
    Resolved
    The program ran too longcan somebody help me why this statement occurs and my code can't pass validation?
    • 01.05.2021
    • 717views
    • 8comments
    0
  • partha protim sen
    Level 2
    Delhi
    Question about the task Bugs and features
    Java Syntax, Level 0, Lesson 8
    Under discussion
    please help me i am getting a typo errorplease help me with this code
    • 09.09.2018
    • 1814views
    • 2comments
    0
  • Zach
    Level 22
    Fort Collins
    Question about the task HashMap of cats
    Java Syntax, Level 8, Lesson 3
    Under discussion
    How do you put the cat object in the map?? // put cats in HashMap for (int i = 0; i < cats.length; i++) { Cat cat[i] = new Cat(); catMap.put(cats[i], cat[i]); } I know you can't do this but this is where my thinking is. Do you need to create a new Cat each time and put it in the hashmap
    • 07.02.2021
    • 886views
    • 2comments
    2
  • Fabian Andiel
    Level 25
    Vienna
    Question about the task Four mistakes
    Java Core, Level 3, Lesson 2
    Under discussion
    Dream interface?Hi guys, I got the sulotion with the help of the forum, but I am not completely sure about the following points: "hy has the dream Interface access to the Hobby class? Why can we access the Dream Interface directly? I thought interfaces are all abut methods, why we instantiate a variable in the i
    • 20.07.2020
    • 654views
    • 1comment
    0
  • Rafał
    Level 35
    Łódź
    Question about the task Deserializing an XML object
    Java Collections, Level 3, Lesson 8
    Under discussion
    what am i doing wrong?what am i doing wrong?
    • 08.10.2020
    • 516views
    • 1comment
    0
  • Szymon
    Level 41
    Warsaw
    Question about the task Another kind of deadlock
    Java Multithreading, Level 7, Lesson 4
    Resolved
    Woudn't just synchronized (lock) {} be enough?Why do we need to lock (this) as well? I see it that way: The thread goes into the first method -> locks the 'lock' mutex -> then goes to the second method and tries to go into the synchronize (lock) {} block but it can't because the 'lock' mutex was already acquired in the first method ->
    • 27.04.2021
    • 670views
    • 5comments
    0
  • Maria
    Level 22
    Moscow
    Question about the task Symbol frequency
    Java Core, Level 8, Lesson 11
    Resolved
    trying to pass penultimate requirements..What is wrong? Treemap is already sorted...
    • 29.04.2021
    • 416views
    • 2comments
    0
  • The Chief
    Level 18
    Question about the task Task about algorithms
    Java Syntax, Level 9, Lesson 11
    Under discussion
    Need help understanding this code.I couldn't figure out this task so I had to download the solution but I need help understanding it. First, how can the user enter both strings and numbers when the arraylist and array in the main method are only string types? Is it because the compiler takes the numbers and sets them as being of st
    • 28.04.2021
    • 691views
    • 5comments
    0
  • John
    Level 17
    Mansfield
    Question about the task Let's make the code do something useful!
    Java Syntax, Level 9, Lesson 11
    Under discussion
    Help there is no copy happeningi can't figure out what's wrong or lacking
    • 27.04.2021
    • 683views
    • 8comments
    0
  • Jurij Thmsn
    Level 29
    Flensburg
    Question about the task Serializing people
    Java Core, Level 10, Lesson 10
    Resolved
    quick questionI get it why the Logger and PrintStream fields must be transient. Can anyone explain me briefly why the fullName and greeting fields have to be transient, too? (regarding "final" modifier the Professors' article said: "Second, you should also pay attention to variables with the final modifier. Whe
    • 28.04.2021
    • 595views
    • 2comments
    0
  • Andrei
    Level 41
    Question about the task Finagle's first law: if an experiment succeeds, then something went wrong...
    Java Multithreading, Level 5, Lesson 11
    Resolved
    What's the point of this exercise? I moved the Thread.yield(); around the code and the output was the same. I don't get it. public class Solution { public static class YieldRunnable implements Runnable { private int index; public YieldRunnable(int index) { this.index = index; } public void run() { System.out.println("begin-" + index); Thread.yield
    • 28.04.2021
    • 843views
    • 2comments
    0
  • Csaba Fülöp
    Level 6
    Debrecen
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Under discussion
    Display max is not fullfilled even if it is :/Every condition have passed except displaying max, however on the console it gets displayed yet the condition is not met. Can anyone help me to understand why it is not accepted?
    • 25.04.2021
    • 602views
    • 3comments
    0
  • Cristian
    Level 16
    Bucharest
    Question about the task Minimum and Maximum
    Java Core, Level 1, Lesson 11
    Under discussion
    My output is The minimum is 0 The maximum is 0. Why? What should I change in my code? Thanks a lot! package com.codegym.task.task11.task1123; public class Solution { public static void main(String[] args) throws Exception { int[] data = new int[]{1, 2, 3, 5, -2, -8, 0, 77, 5, 5}; Pair result = getMinimumAndMaximum(data); System.out.println("The minimum is " + result
    • 28.04.2021
    • 441views
    • 2comments
    0
  • Andrei
    Level 41
    Question about the task It's not as easy as it seems
    Java Multithreading, Level 5, Lesson 7
    Under discussion
    Help please? What should I do here?Can anyone please provide some pointers?
    • 27.04.2021
    • 493views
    • 5comments
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    Is this possible?? Isn't it just another misspelling again?https://codegym.cc/quests/lectures/questcore.level07.lecture01 The "another example" in the lesson, with the swaping of the names. As Dmitri said in his post at 29 December 2020, 06:07: "if each thread is working with it's own MyClass instance why all this mess should happen?" In my opinion, this pr
    • 26.04.2021
    • 742views
    • 10comments
    0
  • Maxim Raitin
    Level 20
    Tomsk
    Question about the task Writing to a file from the console
    Java Core, Level 3, Lesson 11
    Resolved
    Please Help meHello there! What is wrong?
    • 26.04.2021
    • 626views
    • 3comments
    0
  • Sophia
    Level 1
    Question about the task Kind words for the teacher
    Java Syntax, Level 0, Lesson 4
    Under discussion
    Can't find what's wrongI can't see what's wrong with this. Everytime I try to run it, it says it can'r find the symbol and highlights the first period in the code. public static void main(String[] args) { System.out.printIn("Ellie is clever"); System.out.printIn("Ell
    • 28.12.2020
    • 626views
    • 5comments
    0
  • Steven's Education
    Level 7
    Jahil
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Under discussion
    The code works but not with the taskI created the algorithm to find the maximum number from x input.It works but it doesn't fill the requirements. Somebody help please
    • 23.04.2021
    • 684views
    • 3comments
    0
  • Emeka
    Level 4
    Question about the task Minimum of four numbers
    Java Syntax, Level 2, Lesson 8
    Under discussion
    confusion about the ? operatorI have an idea for how the ? operator works: it is shorthand for if else statements. though I'm confused as to how it can be put as a return value of a method. At first, I thought the operator was syntactically equivalent (i.e. in any context, you can interchange the two and the program will yield t
    • 24.04.2021
    • 972views
    • 3comments
    0
  • Sansho
    Level 19
    Bordeaux
    Question about the task Task about algorithms
    Java Syntax, Level 9, Lesson 11
    Under discussion
    The outputs are okay, but the robot is tellin' me NooOOooWell, I think my algo is correct but it doesn't validate 2 things (well I admit, I don't used correctly the "greaterThan" because I found something more efficient)...
    • 23.04.2021
    • 618views
    • 4comments
    0
  • Cristian
    Level 16
    Bucharest
    Question about the task Functionality is not enough!
    Java Syntax, Level 10, Lesson 11
    Under discussion
    Something is wrong here! Thank you so much! package com.codegym.task.task10.task1019; import java.io.*; import java.util.HashMap; /* Functionality is not enough! */ public class Solution { public static void main(String[] args) throws IOException { HashMap map = new HashMap<>(); BufferedReader reader = new Buffe
    • 23.04.2021
    • 617views
    • 2comments
    0
  • Anthony Chalk
    Level 30
    London
    Question about the task Writing our own ThreadFactory
    Java Multithreading, Level 8, Lesson 4
    Under discussion
    Got it right but don't understand small pointI initially failed: The AmigoThreadFactory factory must create threads that are not daemons. The AmigoThreadFactory factory must create threads with a normal priority level. Until I added: thread.setDaemon(false); thread.setPriority(5); But aren't these the default values for any new Thread?
    • 22.04.2021
    • 1202views
    • 7comments
    0
  • 1
  • ...
  • 73
  • 74
  • 75
  • 76
  • 77
  • ...
  • 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