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 We don't need repeats
    Java Syntax, Level 8, Lesson 8
    Resolved
    I realy don t understand how this solution workI don t see why removeFirstNameDuplicates(Map map) works. Pls, i realy need an explanation! Tk you! public static void removeFirstNameDuplicates(Map map) { map = {"ab"-"ab", "ac"-"ac", "ad"-"ab", "ae"-"ab"...} // let say ArrayList list = new ArrayList<>(); // empty array
    • 25.11.2021
    • 692views
    • 4comments
    0
  • Jomar Tayactac
    Level 5
    Winnipeg
    Question about the task Prices 2
    Java Core, Level 8, Lesson 11
    Under discussion
    Any help would be appreciated.I can't seem to figure out what's causing my code to not verify the 3rd and 4th requirements. Please take a look at my code and recommend what I could try. Thanks in advance.
    • 31.01.2022
    • 456views
    • 5comments
    0
  • Angeget
    Level 22
    Potsdam
    Question about the task Splitting a file
    Java Core, Level 8, Lesson 5
    Resolved
    Please i need some help. I tried it over and over again unfortunately i could not figure out.Please i need some help. I tried it over and over again unfortunately i could not figure out.
    • 19.02.2019
    • 2096views
    • 24comments
    0
  • hidden #10920327
    Level 24
    Question about the task Triangular array
    Java Syntax, Level 6, Lesson 6
    Resolved
    Good result, still no passIm getting the result, but still can't pass the verification. Where's the mistake?
    • 31.01.2022
    • 920views
    • 2comments
    0
  • Angel Stefan
    Level 23
    Sibiu
    Question about the task Clew
    Java Core, Level 6, Lesson 13
    Resolved
    I have no idea how to pass with thread4I don't know how a thread can implement a random interface. I can't do it with an X class obj. Any help will be appreciete, tk you!
    • 30.01.2022
    • 668views
    • 4comments
    0
  • Henrique
    Level 41
    São Paulo
    Question about the task User, loser, coder and programmer
    Java Core, Level 4, Lesson 8
    Resolved
    Output is correct, but failed to pass the last 4 requirementsJust don't understand why. Could somebody help?
    • 04.06.2020
    • 863views
    • 7comments
    0
  • Jcode
    Level 27
    Question about the task Checking the order
    Java Syntax, Level 13, Lesson 5
    Under discussion
    A question A condition of the task is:- If the list is not ordered by increasing string length, then display the index of the first element that violates this order. The list is:- grandfather grandmother father mother son daughter cats dog program car My code displayed index 1 (Grandmother) as it is the first
    • 30.01.2022
    • 469views
    • 4comments
    0
  • Vitalina
    Level 20
    Question about the task Comparable
    Java Core, Level 7, Lesson 10
    Resolved
    The problem with compareTo methodHi! I have a problem with compareTo method. "Be sure that compareTo method returns different values for different objects". I've already checked in main method it - and I see that compareTo method returns different values for different objects. So what does codegym wants from me? Thanks in advance!
    • 07.09.2021
    • 1018views
    • 9comments
    0
  • Lawson
    Level 29
    Lagos
    Question about the task Refactoring, nested classes
    Java Multithreading, Level 3, Lesson 6
    Resolved
    Pls help.. I don't understand thishelp
    • 20.09.2020
    • 419views
    • 1comment
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task How do I choose the right one?
    Java Multithreading, Level 3, Lesson 6
    Under discussion
    Using the example from the previous lesson doesn't workIn the previous lesson, they have the line: Zoo.Mouse mouse = new Zoo.Mouse(); Why isn't the solution: obj = new Solution.TEST(); This won't compile, it says it doesn't know what TEST is.
    • 01.01.2022
    • 397views
    • 4comments
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    Files.move() method and moving directoriesOracle API says about this method: " This method may be invoked to move an empty directory. ... When invoked to move a directory that is not empty then the directory is moved if it does not require moving the entries in the directory. ... When moving a directory requires that its entries be mov
    • 29.01.2022
    • 441views
    • 4comments
    0
  • Azja
    Level 32
    Krakow
    Question about the task A convert can easily convert others
    Java Multithreading, Level 6, Lesson 2
    Resolved
    Actually I don't understand this question in allNeed help with compare method
    • 30.05.2019
    • 1925views
    • 12comments
    1
  • Sajjad Ahmed
    Level 10
    Bangalore
    Question about the task Longest string
    Java Syntax, Level 7, Lesson 6
    Under discussion
    Task is giving expected result but validation s failing can you helppublic class Solution { private static ArrayList strings; static int c_len = 0, o_len = 0; public static void main(String[] args) throws Exception { strings = new ArrayList<>(); ArrayList index = new ArrayList<>(); for (int i = 0; i < 5; i++) {
    • 20.01.2022
    • 456views
    • 6comments
    0
  • Sara
    Level 23
    Maribor
    Question about the task Replacing numbers
    Java Core, Level 9, Lesson 11
    Archived
    Help pleaseI have no idea what am I doing wrong. The output is exactly the same as in the example when I test the code. I had to miss something… I tried without the try, catch statements in the main method, but it still doesn't verify. I also tried without the method correctLine(String line) and put all the co
    • 13.07.2019
    • 1902views
    • 3comments
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task Snake (part 17)
    Java Multithreading, Level 2, Lesson 18
    Under discussion
    Code seems functionally the same as solution but won't pass validationPasting it here so you don't have to find it in the attached code: public void move(int x, int y) { SnakeSection head = new SnakeSection(this.getX() + x, this.getY() + y); checkBorders(head); checkBody(head); if(isAlive()) { this.sections.
    • 24.12.2021
    • 409views
    • 1comment
    0
  • Henrique
    Level 41
    São Paulo
    Question about the task Census
    Java Syntax, Level 8, Lesson 8
    Under discussion
    If the KEY must be unique, why does it ask to check if people have the same last name (which is the key)?I was able to solve this task only when I changed the last names (map keys), so they were all different from each other. So why does the task ask to check if people have the same last name, if for the last name to be the same, the key must also be the same? I'm really confused here. Does somebody
    • 11.05.2020
    • 656views
    • 5comments
    1
  • Giorgio Verzicco
    Level 26
    Cerignola
    Question about the task Counting words
    Java Core, Level 9, Lesson 5
    Resolved
    Last task fails even if is correctTested on a real file, works correctly, but keeps failing "The program must output to the console the number of times the word "world" appears in the file." package com.codegym.task.task19.task1907; /* Counting words */ import java.io.BufferedReader; import java.io.FileReader; import java.io.IO
    • 26.01.2022
    • 548views
    • 2comments
    0
  • LuisRC
    Level 39
    Gijón
    Question about the task LinkedList and ArrayList
    Java Syntax, Level 14, Lesson 5
    Under discussion
    About return statementHi there, Solving this task I found that in the Object Method there's no return type declaration and that puzzles me. Is it or is not compulsory declare the returning type in a Method? public static Object createArrayList() { //write your code here List arrayList = new ArrayList&l
    • 26.01.2022
    • 646views
    • 1comment
    0
  • TheLordJackMC
    Level 39
    Princeton
    Question about the task Aggregator (part 13)
    Java Collections, Level 8, Lesson 15
    Under discussion
    errorsi downloaded the right solution and it matched my original one several times, but every time i run it i gives me this: class, interface, or enum expected. file com/codegym/task/task28/task2810/view/backup.htmlSolution.java, line 1, position 0 class, interface, or enum expected. file com/codegym/task
    • 13.08.2021
    • 533views
    • 2comments
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task Refactoring (part 9)
    Java Multithreading, Level 5, Lesson 16
    Resolved
    I deleted a method and need to get it back to pass validationNote: At the time of writing, CodeGym is attaching the wrong task code (for task 2909, which has something to do with cars). I don't know why this is. Other questions on this help page are also showing code for task 2909 but the comments don't seem to reflect that, so I suspect it's a temporary glit
    • 24.01.2022
    • 862views
    • 3comments
    0
  • saurabh
    Level 17
    Bangalore
    Question about the task Display right away
    Java Syntax, Level 3, Lesson 3
    Under discussion
    how to do it in intellij.. I have set up the intellij... it has 3 subfolders under CodeGym Tasks...
    • 07.10.2018
    • 2268views
    • 2comments
    0
  • Anon#10923148
    Level 9
    Question about the task Quadrants
    Java Syntax, Level 3, Lesson 8
    Resolved
    what is this for?is there any way to explain what kind of problem this solves?
    • 23.01.2022
    • 442views
    • 3comments
    0
  • Brentachii
    Level 13
    United States of America
    Question about the task Calculator
    Java Syntax, Level 11, Lesson 4
    Resolved
    why won't the percentage take my answer when it works?I've tried these several different ways that displayed properly but it won't take it and says it's wrong. any help would be appreciated, thanks.
    • 24.01.2022
    • 804views
    • 7comments
    0
  • Mary Khan
    Level 23
    Russia
    Question about the task Is anyone there?
    Java Syntax, Level 6, Lesson 8
    Under discussion
    Why verification of my code is failed?Why did my code verification fail?
    • 23.01.2022
    • 488views
    • 2comments
    0
  • school
    Level 1
    Ramsgate
    Question about the task Minesweeper (Part 3/16)
    Games, Level 0, Lesson 0
    Under discussion
    memesmems
    • 04.02.2021
    • 439views
    • 0comments
    0
  • Anon#10923148
    Level 9
    Question about the task Favorite board games
    Java Syntax, Level 8, Lesson 2
    New
    BoardGame classSo it seems like in this task we are filling the collection array with 5 different strings. Why do we need code to the BoardGame class?
    • 24.01.2022
    • 443views
    • 0comments
    0
  • Gellert Varga
    Level 23
    Szekesfehervar
    Resolved
    Enum StandardOpenOption and StandardCopyOption1.) Enum StandardOpenOption: What is the difference between CREATE and CREATE_NEW? 2.) import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; Will it import only one static variable? (Till now, I've only ever seen the whole class imported in all cases.) Is it obligatory to use "static
    • 21.01.2022
    • 389views
    • 4comments
    0
  • y-meyer2
    Level 28
    Germany
    Question about the task Synchronized methods
    Java Core, Level 7, Lesson 10
    Under discussion
    Why don´t you need to use volatile on "param" or "sb" ?If you use this class with several threads then the param and sb should also be marked as volatile or am i wrong?? private double param = Math.random(); private StringBuilder sb = new StringBuilder();
    • 23.01.2022
    • 331views
    • 1comment
    0
  • Ajani
    Level 16
    Jacksonville
    Question about the task Five winners
    Java Syntax, Level 8, Lesson 11
    Under discussion
    Just makin sure your aware the sort code needs to able to sort more than just the 20 it asks for.Behold code that one hundred percent solves what it's asking for but doesn't sort arrays of a size different than 20.
    • 23.01.2022
    • 439views
    • 1comment
    0
  • LuisRC
    Level 39
    Gijón
    Question about the task The largest number
    Java Syntax, Level 13, Lesson 2
    Under discussion
    Failed taskHi there, Why my solution has failed to pass the validation?
    • 21.01.2022
    • 488views
    • 6comments
    0
  • 1
  • ...
  • 48
  • 49
  • 50
  • 51
  • 52
  • ...
  • 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