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
  • R S ROHITH KRISHNAN
    Level 6
    Chennai
    Question about the task Create a Dog class
    Java Syntax, Level 5, Lesson 7
    Under discussion
    what did i missdid i miss something
    • 8/3/19
    • 1335views
    • 2comments
    0
  • Henry Yao
    Level 22
    Pasadena
    Question about the task Implement the fight method
    Java Syntax, Level 5, Lesson 5
    Under discussion
    not be able pass the last requirement but output correct, pls help! package com.codegym.task.task05.task0502; /* Implement the fight method */ public class Cat { public int age; public int weight; public int strength; public Cat() { } public boolean fight(Cat anotherCat) { //write your code here if((this.age < anotherCat.age)
    • 3/11/20
    • 1527views
    • 6comments
    0
  • Dinesh
    Level 7
    Delhi
    Question about the task Price of apples
    Java Syntax, Level 4, Lesson 1
    Under discussion
    What i am failing to understand about static variables and methods and about this keyword please explainUnderstanding on the task :- The static variable applePrice Line 17 has been accessed by the class name Apple.applePrice at Line no 22 Line 16 Apple Class method addPrice() also static Line 19 2 objects of the Apple class Line 9 apple and Line 11 apple2 which is calling the static addprice () m
    • 5/25/20
    • 1082views
    • 4comments
    2
  • tony
    Level 20
    Nis
    Question about the task Dividing by zero
    Java Syntax, Level 9, Lesson 11
    Resolved
    why this code it's not verified?why this code it's not verified? I have tried in Eclipse and it's work If I put (10,2) in line 12, I get 5 as a result In case (10, 0) result is error, but this is the point, isn't it?
    • 12/30/18
    • 2159views
    • 3comments
    0
  • Marek Pasierbek
    Level 9
    Poznań
    Question about the task Kind Emma and the summer holidays
    Java Syntax, Level 8, Lesson 8
    Under discussion
    Why getMonth() method is deprecated ? public static void removeAllSummerPeople(HashMap map) { Iterator> iterator = map.entrySet().iterator();//write your code here while (iterator.hasNext()) { Map.Entry entry = iterator.next(); if (entry.getValue().getMonth() >= 5 && entry.getValue(
    • 7/17/20
    • 771views
    • 3comments
    0
  • Nithin
    Level 35
    Hyderabad
    Question about the task Hippodrome (part 6)
    Java Multithreading, Level 1, Lesson 16
    Resolved
    anyone please help me what i am missing here ?I think i am missing something in conditions .please help me
    • 6/26/19
    • 1437views
    • 5comments
    0
  • Antonia
    Level 10
    Question about the task Seeing dollars in your future
    Java Syntax, Level 4, Lesson 10
    Under discussion
    helphelp
    • 7/9/19
    • 2249views
    • 12comments
    0
  • Eduardo
    Level 23
    Coyoacan
    Question about the task Ten cats
    Java Syntax, Level 9, Lesson 11
    Resolved
    Not sure where am I going wrongHi, I'm trying to iterate over the map to get the keys and put them in the set but I'm not sure how to accomplish that. Thanks!
    • 1/30/19
    • 2714views
    • 6comments
    2
  • hidden #10625598
    Level 23
    Question about the task Making the right conclusion
    Java Core, Level 10, Lesson 10
    Under discussion
    what is wrong here?main calls class C method2 this prints method2 and calls super.method1(); then im unsure if because method 1 is private it calls method 2 instead? beacuse my output is method 2, okay so then i call A method1 from A method2 - all fine after printing the text i create a new B object to call c
    • 7/17/20
    • 725views
    • 3comments
    0
  • Jay
    Level 17
    Washington
    Question about the task Incorrect lines
    Java Core, Level 3, Lesson 11
    Under discussion
    Interface can have state??I thought that an interface only contains behavior and cannot contain state. If this is correct, is String NAME not considered state?
    • 8/13/19
    • 1557views
    • 7comments
    0
  • hidden #10625598
    Level 23
    Question about the task Overriding serialization in a thread
    Java Core, Level 10, Lesson 10
    Under discussion
    hey a question, since when do we have to add true to a FileOutputStream parameter? what is this for?private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); stream = new FileOutputStream(fileName, true); <<<<<<<<<<< }
    • 7/17/20
    • 612views
    • 3comments
    0
  • Henrique
    Level 41
    São Paulo
    Question about the task Reading and writing static fields to a file
    Java Core, Level 10, Lesson 2
    Under discussion
    Can anyone explain me anything about this task?I didn't understand anything, so I don't even know what to ask... And some other questions about this and the last tasks: 1. What does it mean when we write something like "classWithStatic.i" and "loadedObject.j" (these ".i" and ".j")? I don't remember seeing something like this before. Until now,
    • 7/8/20
    • 607views
    • 2comments
    2
  • Johannes
    Level 27
    Centurion, Pretoria
    Question about the task Incorrect lines
    Java Core, Level 3, Lesson 11
    Resolved
    just one question:Why is the String variable name in uppercase ? interface SimpleObject { String NAME = "SimpleObject"; void onPress(); } And if it is to maybe denote that it's a final variable, should the word "final" not be used in front ?
    • 3/22/20
    • 991views
    • 1comment
    0
  • andy 6473
    Level 9
    Bangalore
    Question about the task Changing functionality
    Java Syntax, Level 7, Lesson 12
    Under discussion
    The code which i wrote is mentioned below. can some one let me know what is wrong . i am unable to concat ArrayList string2 = new ArrayList<> ( ); // to check odd or even for(int i= 0 ; i < list.size (); i++){ String s = list.get ( i ); string2.add ( s ); } for(int i = 0 ; i < string2.size();i++){ if(string2.get ( i ).
    • 7/17/20
    • 725views
    • 2comments
    0
  • David
    Level 26
    Bucharest
    Question about the task Reading and writing to a file: CodeGym
    Java Core, Level 10, Lesson 2
    Under discussion
    Help, please!An exception occurs in the save/load methods.
    • 7/17/20
    • 601views
    • 1comment
    0
  • dhanush
    Level 30
    Chennai
    Question about the task Longest sequence
    Java Syntax, Level 8, Lesson 6
    Resolved
    helpdonno what's wrong in this last condition is not met
    • 6/11/20
    • 641views
    • 2comments
    0
  • dhanush
    Level 30
    Chennai
    Question about the task We don't need repeats
    Java Syntax, Level 8, Lesson 8
    Resolved
    helpcode is not working donno what's the problem in this :(
    • 6/9/20
    • 904views
    • 1comment
    0
  • Onome Brownly-Otiede
    Level 9
    Galway
    Question about the task Positive and negative numbers
    Java Syntax, Level 4, Lesson 7
    Under discussion
    pls helpI just do not know what to do pls help
    • 7/13/20
    • 894views
    • 2comments
    0
  • dhanush
    Level 30
    Chennai
    Question about the task Minesweeper (Part 13/16)
    Games, Level 0, Lesson 0
    Resolved
    need helpdonno whats wrong in this problem help me to find the solution
    • 6/27/20
    • 711views
    • 0comments
    0
  • Adam
    Level 25
    London
    Question about the task Streets and houses
    Java Syntax, Level 7, Lesson 4
    Archived
    Got a code I am happy with, but it would verifyWhat am i missing please guys :)
    • 7/16/20
    • 525views
    • 1comment
    0
  • George Kyei Amoateng
    Level 19
    Hamburg
    Question about the task Chicken factory
    Java Core, Level 4, Lesson 6
    Under discussion
    What can probably be wrong with my code?Hi guys I need help with my Code.Unfortunately it's unable to pass verification check but when i run with intellij IDE i get the exact output required.
    • 7/16/20
    • 600views
    • 2comments
    0
  • Maxine Hammett
    Level 19
    San Diego
    Question about the task Month number
    Java Syntax, Level 8, Lesson 11
    Resolved
    Output is right but still fails final verificationMy output is correct but for some reason it doesn't pass the final verification task. Your help is appreciated.
    • 7/16/20
    • 812views
    • 2comments
    0
  • Brad Reed
    Level 19
    Hartford
    Question about the task Robot wars
    Java Core, Level 3, Lesson 11
    Resolved
    Logic issuesHelp would be great. I thought I implemented the attack/defend properly, I did not. If someone could point me to my error I would be very grateful.
    • 7/16/20
    • 684views
    • 4comments
    0
  • Anton
    Level 26
    Oslo
    Question about the task Identical words in a list
    Java Syntax, Level 10, Lesson 11
    Resolved
    The program runs forever in IntelliJ IDEA and command line. What can be a reason of that? I don't see any infinite loops here.
    • 4/30/20
    • 1552views
    • 3comments
    1
  • Marek Pasierbek
    Level 9
    Poznań
    Question about the task Shared last names and first names
    Java Syntax, Level 8, Lesson 11
    Under discussion
    I don't have ideaThis task should be so easy so why HashMap is not correct? Why also if I call 2 methods in main class something is wrong?
    • 7/16/20
    • 608views
    • 1comment
    0
  • null
    Level 29
    Poznan
    Question about the task Prevent cloning
    Java Multithreading, Level 1, Lesson 8
    Under discussion
    Don't forget about the equals and hashCode methods! Don't forget about the equals and hashCode methods! I have forgotten but still have passed. What's the point? Should I always override this methods?
    • 8/29/19
    • 1714views
    • 3comments
    3
  • George Kyei Amoateng
    Level 19
    Hamburg
    Question about the task MovieFactory
    Java Core, Level 4, Lesson 8
    Under discussion
    Why is my code not verifyingI need help to pass the last check
    • 7/16/20
    • 659views
    • 1comment
    0
  • Angelo Spampinato
    Level 18
    Boston
    Question about the task Brain training
    Java Core, Level 5, Lesson 12
    Resolved
    Not sure why the 4th task is failing?I'm calling the move method doAnotherAction() on the object passed to it, not sure what else to do to get this to pass.
    • 7/16/20
    • 613views
    • 3comments
    0
  • Riya
    Level 15
    Indore
    Question about the task Shortest or longest
    Java Syntax, Level 7, Lesson 6
    Resolved
    The output is correct but not satisfies 3 and 4 conditionplease help me in solving it.
    • 7/16/20
    • 582views
    • 4comments
    0
  • Maxine Hammett
    Level 19
    San Diego
    Question about the task Contract
    Java Syntax, Level 1, Lesson 6
    Resolved
    Output is correct but fails final verificationI can't figure out what's wrong with this code. The output matches the task but it fails verification. Your help is appreciated.
    • 7/16/20
    • 484views
    • 1comment
    0
  • 1
  • ...
  • 168
  • 169
  • 170
  • 171
  • 172
  • ...
  • 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