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
  • Angel Stefan
    Level 23
    Sibiu
    Question about the task Different methods for different types
    Java Core, Level 5, Lesson 12
    Resolved
    I can't call print(String s)I don't understand how to put the code to be able to call print(String ) after 4 hours of work, any hint? Tk you!
    • 05.01.2022
    • 381views
    • 1comment
    0
  • Dan Ursu
    Level 27
    Question about the task Iterating through a file tree
    Java Collections, Level 1, Lesson 2
    Archived
    I cant pass the 1 condition, help please package com.codegym.task.task31.task3101; /* Iterating through a file tree */ import java.io.*; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; /*** * Listar todos los ficheros de un directorio y de sus subdirectorios */ public class Solutio
    • 04.01.2022
    • 385views
    • 2comments
    0
  • Константин Савченко
    Level 25
    Ukraine
    Question about the task Binary encoding
    Java Syntax, Level 10, Lesson 8
    Under discussion
    What is wrong?I have this in return. return "0000".substring(binaryNumber.length() % 4) + binaryNumber In terminal, I have response: In Unicode, the character C is 67, but in binary it is 01000011 In Unicode, the character o is 111, but in binary it is 01101111 In Unicode, the character d is 100, but in bina
    • 30.12.2021
    • 694views
    • 3comments
    0
  • Константин Савченко
    Level 25
    Ukraine
    Question about the task StringTokenizer
    Java Syntax, Level 9, Lesson 6
    Under discussion
    Explain me pleaseI should return String[] from method. I return it, but main method should return {"java", "util", "stream"} . Why it returns [java, util, stream];?
    • 30.12.2021
    • 548views
    • 4comments
    0
  • Neha Anjum
    Level 6
    Hyderabad
    Question about the task Minimum of four numbers
    Java Syntax, Level 2, Lesson 8
    Resolved
    I verified my solution....-20 // correct -40 // correct -30 // correct 40 // incorrect !!!....What do I do..? Please Help..!!! 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) { min(a,b); if(c<=a && c<=b && c<=d) return c; else return d; } public s
    • 13.09.2018
    • 2302views
    • 6comments
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    What is the correct coding of the @Override toString() method?Suppose we have such a class: public static class Cat { public int age; public int weight; public String name; } In CodeGym tasks, we sometimes get ready toString() methods, usually in this form: @Override public String toString() { return String.fo
    • 02.01.2022
    • 330views
    • 2comments
    0
  • Angel Stefan
    Level 23
    Sibiu
    Question about the task OOP: Fix inheritance problems
    Java Core, Level 5, Lesson 2
    Resolved
    I can' t pass the last conditionI need a hint, tk you! What is that i don't see?
    • 03.01.2022
    • 572views
    • 3comments
    0
  • Szymon Pawlikowski
    Level 19
    Question about the task This age doesn't work for me…
    Java Syntax, Level 3, Lesson 4
    Under discussion
    How is it possible that we can create instance of static class?!Hello, I have done task, but I don't understand how is it possible that we create instance of static class. I thought that static class doesn't allow to create its' instance. Could someone explain it to me?
    • 29.12.2021
    • 536views
    • 4comments
    0
  • public enum WaysToDie
    Level 23
    Denver
    Question about the task Correct order
    Java Syntax, Level 7, Lesson 2
    Resolved
    What am I missing.I have completed the requirements, but it still fails. I don't know what I have missed. I would return the new array if the assignment would let me do such a thing but I have to change the original array and that is what I believe I have done. I believe it may be the commas after the last element w
    • 18.12.2021
    • 620views
    • 4comments
    0
  • Michael Brimage
    Level 19
    Washington D.C.
    Question about the task Default values
    Java Core, Level 5, Lesson 9
    Under discussion
    I dont unstand why..I dont understand why I'm required to create a new solution object. The lesson does not really explain this very well, in my opinion. Can someone please explain this to me?
    • 17.04.2020
    • 1138views
    • 2comments
    0
  • LucGar
    Level 22
    Bilbao
    Question about the task OOP: Method overloading - Eliminating the superfluous
    Java Core, Level 5, Lesson 4
    Resolved
    cuestionWhy the method with byte, not work?
    • 06.04.2020
    • 822views
    • 3comments
    0
  • public enum WaysToDie
    Level 23
    Denver
    Question about the task Let's talk music
    Java Core, Level 6, Lesson 3
    Under discussion
    Need adviceSo I tried using Date.compareTo * 1000 to get the milliseconds. This, my current implementation, also works but continues to fail the test.
    • 31.12.2021
    • 463views
    • 1comment
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    What kind of strange class structure is this? public class MyClass { public static void main(String[] args) { MyClass myC = new MyClass(); innerClass inC = myC.new innerClass("inner"); // innerClass inC2 = new innerClass("in"); = ERROR // innerClass inC3 = MyClass.new innerClass("inner"); = ERROR
    • 23.12.2021
    • 571views
    • 13comments
    0
  • public enum WaysToDie
    Level 23
    Denver
    Question about the task Factorial
    Java Core, Level 5, Lesson 12
    Under discussion
    I checked the output and everything.My solution seems to return and print the correct number regardless of test case, yet it still fails testing.
    • 31.12.2021
    • 548views
    • 3comments
    0
  • Lawson
    Level 29
    Lagos
    Question about the task Controlling body weight
    Java Syntax, Level 6, Lesson 8
    Resolved
    pls helpI'm short of ideas concerning the 3rd and fourth requirements
    • 02.08.2020
    • 842views
    • 4comments
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Question about the task Number algorithms
    Java Core, Level 10, Lesson 10
    Resolved
    Does the Math.pow(x, y) method give an inaccurate result? - and the BigInteger class public class ArmstsrongNumberExample { public static long sum = 0; //method to check if the number is Armstrong or not static boolean isArmstrong(long n) { long temp, digits=0, last=0; temp = n; /
    • 26.12.2021
    • 913views
    • 9comments
    0
  • Asia
    Level 19
    Bydgoszcz
    Question about the task Task No. 6 about integer type conversions
    Java Syntax, Level 10, Lesson 4
    Under discussion
    Float fWait what? float f = (short) 0.50 f; The result is 0.0 So..... float 0.50 gets casted to short so we cut the fractional part and get 0, and then cast it again to float and get 0.0?? that is crazy
    • 01.06.2021
    • 655views
    • 2comments
    2
  • Jason
    Level 26
    Rancho Cucamonga
    Question about the task New functionality!
    Java Multithreading, Level 5, Lesson 2
    Under discussion
    it works but not passing last conditionso not sure what I need to do to pass the last condition was hoping someone had some insight on the subject. Thanks in advance : )
    • 16.03.2020
    • 983views
    • 2comments
    0
  • Stephen Haokip
    Level 13
    Question about the task Task about algorithms
    Java Syntax, Level 9, Lesson 11
    Under discussion
    line 57 of the correct solutionhow did they find out if the passed string is a number or not from the length. or is there a way to determine whether a string is a number from the length of the string. i m totally confused.
    • 30.12.2021
    • 698views
    • 1comment
    0
  • Anonymous #10882853
    Level 8
    France
    New
    is 0 the best number :)hello world !🤣
    • 29.12.2021
    • 335views
    • 0comments
    0
  • crispr_cast9
    Level 9
    Saint Petersburg
    Question about the task Ascending numbers
    Java Syntax, Level 6, Lesson 11
    Under discussion
    Why conditions 2 and 3 are not met?2 condition: The program should display 5 numbers, each on a new line. 3 condition: The output must contain the same numbers that were entered (order is not important).
    • 26.12.2021
    • 695views
    • 9comments
    0
  • Andre M.
    Level 4
    Glenn Dale
    Question about the task Positive number
    Java Syntax, Level 3, Lesson 10
    Under discussion
    How to count the number of true results?The task calls for a number of positive numbers to be returned. I created strings within if statements to answer the problem. It has not worked. Is there a way in Java to count only the number of "true" values? Am I overthinking this task?
    • 29.12.2021
    • 1009views
    • 2comments
    0
  • Dmitri
    Level 22
    Seversk
    Question about the task Task No. 3 about integer type conversions
    Java Syntax, Level 10, Lesson 4
    Under discussion
    Does anybody knows why?Actually the print out is 0 here, but why!?
    • 15.11.2020
    • 516views
    • 6comments
    2
  • shovan
    Level 22
    Kolkata
    Question about the task Task No. 3 about integer type conversions
    Java Syntax, Level 10, Lesson 4
    Resolved
    i cant understand what should i do? package com.codegym.task.task10.task1003; /* Task No. 3 about integer type conversions */ public class Solution { public static void main(String[] args) { int f = (int) 128.50; int i = (int) f; int b = (int) (i + f); System.out.println((float)b); } }
    • 23.05.2019
    • 2383views
    • 3comments
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    Merry Christmas to all learners and all voluntary helpers!:)no question here and no code:)
    • 24.12.2021
    • 324views
    • 0comments
    0
  • public enum WaysToDie
    Level 23
    Denver
    Question about the task Singleton
    Java Core, Level 4, Lesson 8
    Under discussion
    Where did I go wrong?I do not know what I did wrong here. Seems simple enough.
    • 27.12.2021
    • 421views
    • 4comments
    0
  • Alexandre Desbois
    Level 10
    Chamarandes-Choignes
    Question about the task Greater than 10? You're not a good fit for us
    Java Syntax, Level 8, Lesson 8
    Resolved
    Why the numbers superior to 10 are displayed in my code?Hello, I don't understand why my method is not working well. public static HashSet removeAllNumbersGreaterThan10(HashSet set) { HashSet set2 = new HashSet<>(); for(Integer element : set){ if(element <= 10){ set2.add(element); }
    • 26.12.2021
    • 778views
    • 3comments
    0
  • Alexandre Desbois
    Level 10
    Chamarandes-Choignes
    Question about the task Changing functionality
    Java Syntax, Level 7, Lesson 12
    Resolved
    My program compile but no outputI don't understand why there is no output with my program. Can you help me?
    • 26.12.2021
    • 561views
    • 5comments
    0
  • public enum WaysToDie
    Level 23
    Denver
    Question about the task GCD
    Java Core, Level 4, Lesson 8
    Resolved
    Exception problemI don't know what I am doing wrong, it seems like if the numbers end up being negative that the program will throw the exception. But I am still failing the tests.
    • 27.12.2021
    • 368views
    • 1comment
    0
  • HeavenlyDestroyer
    Level 41
    Yekaterinburg
    Question about the task Number algorithms
    Java Core, Level 10, Lesson 10
    Under discussion
    Any hints?I don't really understand why it is not verifying anything. It is compiling all right, and the output seems correct.
    • 06.12.2021
    • 515views
    • 4comments
    0
  • 1
  • ...
  • 50
  • 51
  • 52
  • 53
  • 54
  • ...
  • 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