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
  • Nathan
    Level 13
    Below the firmament
    Question about the task Adding
    Java Syntax, Level 4, Lesson 16
    Resolved
    I may or may not have broken something.When I run the program in IntelliJ I think I'm satisfying all the criteria. However when I try to validate the answer it keeps timing out?
    • 07.02.2021
    • 444views
    • 2comments
    0
  • Adrian
    Level 27
    Spanish Town
    Question about the task Equals and HashCode
    Java Multithreading, Level 1, Lesson 5
    Under discussion
    getClass() and instanceof"The equals method should check whether the passed object is a Solution object." Per the stated condition, why does code that uses getClass() check not pass but the instanceof check does? Strictly speaking the instanceof operator is not checking to see if the passed object is a Solution object, bu
    • 06.02.2021
    • 745views
    • 3comments
    0
  • Jordi Claes
    Level 17
    Question about the task Even numbers
    Java Syntax, Level 4, Lesson 13
    Under discussion
    IntelliJ says it requires a boolean for the if statement, what am i doing wrong please?package com.codegym.task.task04.task0435; public class Solution { public static void main(String[] args) throws Exception { int x = 1; for (x =1; x < 101; x++) if (x % 2 = 0) System.out.println(x);//write your code here } }
    • 07.02.2021
    • 752views
    • 2comments
    0
  • Mina Nabil
    Level 17
    Sydney
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Resolved
    Hi, whats wrong with my code ?Hi, whats wrong with my code ?
    • 05.02.2021
    • 687views
    • 2comments
    0
  • Gus Iwanaga
    Level 18
    Munich
    Question about the task R or L
    Java Syntax, Level 7, Lesson 9
    Resolved
    Don't get it why 3rd test condition does not passHi everyone. Been working on this exercise for a few hours and I don't understand my the third test condition does not pass. I'm also not really satisfied with the code structure (additional hints on how to make it cleaner are highly appreciated) but for now a bit of help to help me understand what'
    • 05.02.2021
    • 543views
    • 4comments
    0
  • Christopher Berg
    Level 7
    Under discussion
    Abo monatlich kündbar?Überlege das Abo zu nehmen , würde aber gerne wissen ob es montlich kündbar ist, da ich es nur 3 Monate nutzen möchte. LG Chris
    • 06.02.2021
    • 646views
    • 0comments
    0
  • Anthony Chalk
    Level 30
    London
    Question about the task Phone number verification
    Java Multithreading, Level 2, Lesson 13
    Under discussion
    Please helpSorry the code is a bit messy; not sure why it isn't working
    • 06.02.2021
    • 430views
    • 1comment
    0
  • Mina Nabil
    Level 17
    Sydney
    Question about the task Animal set
    Java Syntax, Level 8, Lesson 11
    Under discussion
    Hi, I was wondering why the remove Cats method is not working ? ThanksHi, I was wondering why the remove Cats method is not working ? Thanks
    • 06.02.2021
    • 453views
    • 3comments
    0
  • Jordan
    Level 7
    Martinsburg
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Under discussion
    I've tested so many numbers, and it seems right. What's wrong? package com.codegym.task.task04.task0416; import java.io.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String input1 = reader.readLine(); d
    • 06.02.2021
    • 523views
    • 1comment
    0
  • Tamas Horcsak
    Level 18
    Leeds
    Question about the task Checking the order
    Java Syntax, Level 7, Lesson 9
    Under discussion
    finally I got the right result but not accepted :(finally I got the right result but not accepted :( public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); ArrayList list = new ArrayList();
    • 03.02.2021
    • 486views
    • 2comments
    0
  • AlfredW
    Level 23
    Denver
    Question about the task Fixing bugs
    Java Core, Level 4, Lesson 8
    Under discussion
    Got it verified but have no idea what is happening.Once again a task where I have had to basically copy strings of code from other answers given in questions to get it right. I am totally missing a whole lot here. Yet when I go back and read through the lessons I do not see the answers. Lost lost lost. But I guess I will just keep plugging away at
    • 16.08.2020
    • 646views
    • 4comments
    2
  • Romain
    Level 26
    Paris
    Question about the task Overriding serialization in a thread
    Java Core, Level 10, Lesson 10
    Resolved
    Bad understandingUntil now I thought we had to re-declare our fields one by one in the readObject method's, like this : private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { fileName = (String) in.readObject(); in.defaultReadObject(); stream = new FileO
    • 03.02.2021
    • 561views
    • 6comments
    0
  • An Gelo
    Level 18
    Cebu
    Question about the task Set of cats
    Java Syntax, Level 8, Lesson 11
    Resolved
    remove 1 one catHI i have problem in removing cat can you guys help me. how do i remove 1 cat.
    • 23.08.2018
    • 3380views
    • 17comments
    0
  • Ryan Palmer
    Level 20
    Philadelphia
    Question about the task Maximum in an array
    Java Syntax, Level 7, Lesson 4
    Resolved
    Comprehension checkPerhaps this is basic, but I am not quite sure I understand what is happening here: public static void main(String[] args) throws Exception { int[] array = initializeArray(); int max = max(array); System.out.println(max); Is this instantiating an array object and immediate
    • 04.02.2021
    • 501views
    • 2comments
    0
  • sgubow
    Level 10
    Forest Grove
    Question about the task Pets need people
    Java Syntax, Level 2, Lesson 5
    Resolved
    Does order matter?So during this task I struggled for awhile and this is what was wrong: I assigned the animals an owner and had this as the code: woman = cat.owner; woman = dog.owner; woman = fish.owner; then I downloaded the correct solution and it was changed to this: cat.owner = woman; dog.owner = woman; fish.
    • 03.02.2021
    • 573views
    • 2comments
    0
  • Andrei
    Level 41
    Question about the task Sorting even numbers from a file
    Java Core, Level 3, Lesson 11
    Resolved
    Very strange output. Please help.I get the output 13, 13, 45 for the input suggested in the exercise. What am I doing wrong? I feel it's from the fileinputstream but I can't put my finger on it. Please advise. This is the current form, I don't know why it isn't updated. public class Solution { public static void main(String[
    • 27.11.2020
    • 753views
    • 6comments
    1
  • Noob_Coder
    Level 22
    Springfield
    Question about the task Playing Javarella
    Java Syntax, Level 7, Lesson 9
    Under discussion
    dk how to doI think it is not a hard question which just add to different list by cases,but idk what's wrong with my code,need clear explanation.
    • 01.11.2020
    • 420views
    • 3comments
    0
  • Anitamalina
    Level 18
    København
    Question about the task Playing Javarella
    Java Syntax, Level 7, Lesson 9
    Under discussion
    Add to the third supplementary list all the remaining numbers from the main list.Why is this wrong?
    • 19.11.2020
    • 498views
    • 2comments
    0
  • J H U X
    Level 7
    Alkmaar
    Question about the task Remove and insert
    Java Syntax, Level 7, Lesson 6
    Resolved
    Almost there...!I'm getting 13 arrays printed out, with everytime the last index in the first spot, so very happy with that. But HOW do I print every value of every array on a separate line? By the way, I've tried System.out.println(list.get(0) too, but that doesn't work either...
    • 05.02.2021
    • 450views
    • 2comments
    0
  • wissam
    Level 24
    Jaramana
    Question about the task Longest sequence
    Java Syntax, Level 8, Lesson 6
    Under discussion
    why my solution is not accepted?package com.codegym.task.task08.task0812; import java.io.*; import java.util.*; /* Longest sequence */ public class Solution { public static void main(String[] args) throws IOException { Scanner scanner = new Scanner(System.in); ArrayList listOfNumbers = new ArrayList();
    • 05.02.2021
    • 390views
    • 1comment
    0
  • Andrew
    Level 29
    Seattle
    Question about the task Chat (part 11)
    Java Multithreading, Level 6, Lesson 15
    Resolved
    My code is timing out on the serverHandshake(connection) call.I can't get past the timeout when calling userName = serverHandshake(connection); I commented that line out so I could fail the test and post my code but I usually run it without comments. I'm also not sure where the removal of the user from map should be. Catch block, finally block or after the tr
    • 21.05.2019
    • 1516views
    • 4comments
    0
  • Bill Wu
    Level 29
    Wellington
    Question about the task Charting our own course
    Java Multithreading, Level 5, Lesson 9
    Resolved
    Not verifiedI got the expected result shown in the example, but cannot pass. I tried different ways like use an array to store the trace as well, but no luck. Any help please? Thanks.
    • 23.04.2019
    • 1604views
    • 5comments
    2
  • Dinesh
    Level 7
    Delhi
    Under discussion
    Error in implementation of logic outside constructors (Concept) Going through the topic Constructors Wanted to implement the concept you should not put your program's logic inside a constructor. For the following I tried to Put all the logic in a separate method. printFactoryInfo(). Where I pass a CarFactory object to it as an argument. putting all the lo
    • 02.02.2021
    • 465views
    • 5comments
    0
  • Madi
    Level 6
    Nice
    Question about the task Initializing cats
    Java Syntax, Level 5, Lesson 7
    Under discussion
    I dunno what's wrong?Pleaaaase help!!!
    • 03.02.2021
    • 549views
    • 5comments
    0
  • Ailana
    Level 2
    San Carlos
    Question about the task Where does a Person come from?
    Java Syntax, Level 2, Lesson 2
    Under discussion
    WHAT IS THE SOLUTION PLZ HELPWHAT IS THE SOLUTION PLZ TELL ME AND EXPLAIN AS SOON AS POSSIBLE PLZZZZ
    • 10.08.2020
    • 633views
    • 4comments
    0
  • Andrei
    Level 41
    Question about the task Counting words
    Java Core, Level 9, Lesson 5
    Resolved
    It counts only 2 out of 3 worlds . Why?It counts only 2 out of 3 worlds . Why?
    • 04.02.2021
    • 702views
    • 3comments
    0
  • Abdelrahman
    Level 5
    Amman
    Question about the task Even numbers
    Java Syntax, Level 4, Lesson 13
    Under discussion
    helpthis is an easy question but I don't understand what 3rd task wants could someone explain for me
    • 04.02.2021
    • 388views
    • 3comments
    0
  • 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
    • 04.02.2021
    • 525views
    • 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?!
    • 03.02.2021
    • 573views
    • 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?
    • 02.02.2021
    • 370views
    • 2comments
    0
  • 1
  • ...
  • 87
  • 88
  • 89
  • 90
  • 91
  • ...
  • 371
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