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
  • Andrei
    Level 41
    Question about the task Reinforce the adapter
    Java Core, Level 9, Lesson 3
    Resolved
    "The getCountryCode() method must return the code for the country returned by the customer field's getCountryName() method." What? How to extract country code from countryName?I have extracted the country code from the getphonenumber() which i believe it is correct. FIrst I split with the paranthesis using .split("\\(") or .split("[(]") ; Then I take everything out after the + ; @Override public String getCountryCode() { String[] countryCode = cont
    • 2/4/21
    • 672views
    • 3comments
    0
  • Maryem Vickers
    Level 7
    HT...
    Question about the task Duplicating words
    Java Syntax, Level 7, Lesson 9
    Under discussion
    Help, please!What's it doing?!
    • 2/3/21
    • 695views
    • 1comment
    0
  • Daniel Whyte
    Level 17
    Question about the task To the top of the list
    Java Syntax, Level 7, Lesson 6
    Under discussion
    ArrayListHow do we decide whether to us an arrayList or just an array of 10?
    • 2/2/21
    • 472views
    • 2comments
    0
  • Шарох
    Level 12
    Question about the task Implement the fight method
    Java Syntax, Level 5, Lesson 5
    Resolved
    Hi Coders ! 1. Why we should use empty class constructor ? 2. I can't understand connection between method and main method ! 3. I'm completely confused. * I know that I ask question a lot but I'm just student.
    • 11/7/20
    • 1052views
    • 11comments
    0
  • Liliane Top
    Level 24
    Amsterdam
    Question about the task Yet another adapter
    Java Core, Level 9, Lesson 3
    Resolved
    What is wrongI tried all version of sequences possible with the first middle and last name but to no avail.
    • 1/9/21
    • 690views
    • 4comments
    0
  • BIYINZIKA
    Level 0
    Kampala
    Under discussion
    about another taskamigo is very smart I run the task and it says its closed but I can't get another task. help please
    • 2/3/21
    • 450views
    • 0comments
    0
  • Andrei
    Level 41
    Question about the task Adapting multiple interfaces
    Java Core, Level 9, Lesson 3
    Resolved
    What is wrong with my solution? Number formatting.It seems the mentor is not accepting this bit of code from me. I ran through it multiple times and can't really see the error but I have a feeling its in the replaceAll method? @Override public String getPhoneNumber() { int countryCode = data.getCountryPhoneCode();
    • 2/3/21
    • 792views
    • 5comments
    0
  • Dyrits
    Level 1
    Question about the task Find the bugs
    Java Core, Level 10, Lesson 10
    Under discussion
    ReadObject() and WriteObject()Why do we need to create a WriteObject() and ReadObject() method in B? Everything seems reversed... Method looks like that: B::writeObject(ObjectOutputStream) B::readObject(ObjectInputStream) But we use them like that: ObjectOutputStream::writeObject(B) (B) ObjectInputStream::readObject() I don't un
    • 10/27/20
    • 619views
    • 0comments
    1
  • Marek
    Level 12
    Prague
    Question about the task 2048 (Part 18/18)
    Games, Level 0, Lesson 2
    Under discussion
    I can't run the code inside IntelliJ.Hi! So I've completed the game within my browser but I'm struggling to see it running in the IntelliJ. Any thoughts? Thanks!
    • 2/2/21
    • 1028views
    • 2comments
    0
  • Dinesh
    Level 7
    Delhi
    Question about the task Describing numbers
    Java Syntax, Level 4, Lesson 7
    Archived
    What is wrong ? import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(reader.readLine()); int c
    • 1/30/21
    • 646views
    • 3comments
    0
  • Rory King
    Level 4
    Budapest
    Question about the task Seasons on Terra
    Java Syntax, Level 4, Lesson 4
    Under discussion
    what am i missing please //write your code here if (month >= 12) { System.out.println("winter " + "(12)"); } if (month > 10) { System.out.println("spring " + "(4)"); } if (month < 7) { System.out.println(
    • 12/16/20
    • 775views
    • 4comments
    0
  • Torben
    Level 26
    Halle (Saale)
    Question about the task Threads and bytes
    Java Core, Level 8, Lesson 11
    Resolved
    I don't know what to do next, can someone help me? Thank you
    • 2/1/21
    • 733views
    • 2comments
    0
  • m.mohammad.7521
    Level 1
    Glasgow
    Question about the task Minesweeper (Part 6/16)
    Games, Level 0, Lesson 0
    Under discussion
    can anybody explain how countMineNeighbours method works?? private void countMineNeighbors() { for (int y = 0; y < SIDE; y++) { for (int x = 0; x < SIDE; x++) { GameObject gameObject = gameField[y][x]; if (!gameObject.isMine) { gameObject.countMineNeighbors = Math.toIntExact(get
    • 1/21/21
    • 534views
    • 1comment
    0
  • Agata
    Level 20
    Warsaw
    Question about the task Prices
    Java Core, Level 8, Lesson 11
    Under discussion
    It doesn't even validateIt says there is a problem with line 47 method strip() and when I gray it out next problem is with line 55 method repeat(), please help me
    • 2/2/21
    • 508views
    • 1comment
    0
  • Andrei
    Level 41
    Question about the task Prices 2
    Java Core, Level 8, Lesson 11
    Resolved
    I don't understand why it won't verify - I am trying to update the file but it removes all the content - "-u", "19847 ", "Swim trunks, blue ", "159.00 ", "20 "The program won't verify, I have tested it with a file that has the example given and the argument "-u", "19847 ", "Swim trunks, blue ", "159.00 ", "20 ". The program runs but the file is empty. I don't understand why it is empty because I have checked the program and it seems ok.
    • 2/2/21
    • 585views
    • 6comments
    0
  • Andrei
    Level 41
    Question about the task Threads and bytes
    Java Core, Level 8, Lesson 11
    Resolved
    Is there a smarter way to do this? Anyway, here is a solution: USE AS A GUIDE, NOT COPY-PASTE! It's best if you try and reproduce the exercise from your mind, this way you will learn betterLet me know if there is a better way to do this. I was thinking of using some kind of a sorted map instead of iterating through the entrySet and storing the highest values, but I did not find relevant information regarding this. package com.codegym.task.task18.task1823; import java.io.*; import ja
    • 1/28/21
    • 946views
    • 4comments
    0
  • Mina Nabil
    Level 17
    Sydney
    Question about the task R or L
    Java Syntax, Level 7, Lesson 9
    Under discussion
    Hi, I keep getting this error java.util.ConcurrentModificationException when I run it on intelliJ. Although, I copied the list, any ideas ?Hi, I keep getting this error java.util.ConcurrentModificationException when I run it on intelliJ. Although, I copied the list, any ideas ?
    • 2/2/21
    • 611views
    • 1comment
    0
  • Liliane Top
    Level 24
    Amsterdam
    Question about the task Prices
    Java Core, Level 8, Lesson 11
    Resolved
    Why does StringBuilder append() method overwrite?How to prevent StringBuilder append() to overwrite existing content? Should I use a different buffer?
    • 1/13/21
    • 1113views
    • 19comments
    0
  • Drazen Jankovic
    Level 11
    München
    Question about the task Only for the rich
    Java Syntax, Level 8, Lesson 8
    Resolved
    pls helpHay people, i need some help here, my task doesn't pass the last condition...
    • 1/31/21
    • 626views
    • 3comments
    0
  • Agata
    Level 20
    Warsaw
    Question about the task Building a file
    Java Core, Level 8, Lesson 11
    Resolved
    Works but doesn't validateI'm missing something again...
    • 1/31/21
    • 643views
    • 2comments
    0
  • Abdelrahman
    Level 5
    Amman
    Question about the task Positive number
    Java Syntax, Level 4, Lesson 7
    Resolved
    HelpI don't understand the last condition since I literally put above or under 0 since its not a negative or positive.
    • 1/30/21
    • 670views
    • 1comment
    0
  • Mina Nabil
    Level 17
    Sydney
    Question about the task Expressing ourselves more concisely
    Java Syntax, Level 7, Lesson 6
    Archived
    Hi, whats wrong with my code public class Solution { public static void main(String[] args) throws Exception { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); int length = 0; int index =0; ArrayList arrayList = new ArrayList<>(); for (int i
    • 1/30/21
    • 596views
    • 2comments
    0
  • Abhishek Rangari
    Level 22
    Nagpur
    Question about the task Counting seconds
    Java Core, Level 6, Lesson 10
    Resolved
    Why it is running infinite ?Can anyone help me in this part ?
    • 12/4/18
    • 1697views
    • 7comments
    0
  • Joyonta Saha
    Level 31
    Question about the task We don't need repeats
    Java Syntax, Level 8, Lesson 8
    Resolved
    How to solve concurrent Exception ?Any Hints?
    • 8/23/18
    • 3004views
    • 14comments
    0
  • Andrea Botticini
    Level 6
    Brescia
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Resolved
    Unsure what I am missingIt works fine with 2.5 so the test methods work. I just can't see it. I would appreciate a hint . cheers in advance.
    • 1/31/21
    • 913views
    • 4comments
    0
  • Agata
    Level 20
    Warsaw
    Question about the task Threads and bytes
    Java Core, Level 8, Lesson 11
    Resolved
    When I run tests it shows correct outputs but doesn't validateI don't know what I'm missing...
    • 1/30/21
    • 1184views
    • 2comments
    0
  • Peter Karanyi
    Level 9
    Cowplain
    Question about the task Max constructors
    Java Syntax, Level 5, Lesson 9
    Under discussion
    THIS IS A HELP TO UNDERSTAND HOW TO SOLVE THIS TASKMine is working finally! Based upon the requirements, first I thought there must be 1 default constructor plus 4 other which is 5 in total. That is not the case! The default constructor is included in the 4 required constructors! So the solution is that you need: - default constructor - constructor
    • 5/24/20
    • 957views
    • 4comments
    6
  • Dinesh
    Level 7
    Delhi
    Under discussion
    How to resolve thisWhile working in intelliJ IDEA on task when I try to execute the task (the current ) it opens up the (previous) task that I had left uncompleted due to some reason.
    • 1/30/21
    • 447views
    • 0comments
    0
  • Przemysław Dr
    Level 20
    Tricity
    Question about the task Sorting bytes
    Java Core, Level 8, Lesson 3
    Resolved
    Program works, but do not pass third requirementHave i missed something? Program is working, but 3rd requirement is not met.
    • 3/18/20
    • 963views
    • 1comment
    1
  • Andrei
    Level 41
    Question about the task Most frequent bytes
    Java Core, Level 8, Lesson 3
    Resolved
    I don't understand a block of code from the solution providedI don't understand what line 9 of the code does byteCountArray[fileInputStream.read()] += 1; What does that operation do? i understand that the array takes the values of array + 1 but what does it add? the value at index fileInputStream.read() + 1? what is the purpose of that addition? publi
    • 1/12/21
    • 632views
    • 6comments
    1
  • 1
  • ...
  • 91
  • 92
  • 93
  • 94
  • 95
  • ...
  • 374
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 © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym