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
  • Alana Robinson
    Level 4
    United States of America
    Question about the task Warm or cold
    Java Syntax, Level 3, Lesson 3
    Under discussion
    Help if else statement error message - error message at line 23 that says else is not a statementHelp! I keep getting an error message at line 23 that says else is not a statement. What should I change or how do I fix this? Thanks!
    • 5/9/22
    • 792views
    • 2comments
    0
  • hidden #10994753
    Level 46
    Question about the task Combining arrays
    Java Syntax, Level 5, Lesson 1
    Resolved
    Any idea about why the checker refuse this solution ?Hello, I don't know why the checker doesn't accept such a solution although it is correct, it is like if it expects a very precise solution! Do you have an idea about this? Thanks. anyway I'm going to do a classic solution
    • 5/10/22
    • 610views
    • 4comments
    0
  • hidden #10994753
    Level 46
    Question about the task Second smallest number entered
    Java Syntax, Level 4, Lesson 2
    Resolved
    The program cover this case !Hello EveryOne The checker is still rejecting my program (file attached) when it really cover this case. The reject reason : If several second smallest numbers are entered, then you need to display any one of them. Thanks for your help. package en.codegym.task.pro.task04.task0410; import java.uti
    • 5/9/22
    • 1018views
    • 3comments
    0
  • hadiza
    Level 2
    Kano
    New
    I want to write a program but i dont know where to startHow to start a program
    • 5/9/22
    • 570views
    • 0comments
    0
  • Miles118
    Level 13
    Brindas
    Question about the task Cutting down the middle
    Java Syntax, Level 6, Lesson 5
    Under discussion
    Hi. Why doesn't my code work ? package en.codegym.task.jdk13.task06.task0633; /* Cutting down the middle */ public class Solution { public static char[][] chars = { {'a', 'b', 'c', 'd', 'e', 'f'}, {'j', 'h', 'i', 'j', 'k', 'l'}, {'m', 'n', 'o', 'p', 'q', 'r'}, {'s', 't', 'u'
    • 5/1/22
    • 919views
    • 4comments
    0
  • Sakka Mouid
    Level 19
    Hannover
    Question about the task Snake (Part 11/20)
    Games, Level 0, Lesson 1
    Under discussion
    the exceution is correct . I don't know why the requirements are not met
    • 4/29/22
    • 453views
    • 2comments
    0
  • Sakka Mouid
    Level 19
    Hannover
    Question about the task Snake (Part 8/20)
    Games, Level 0, Lesson 1
    Resolved
    method does not override or implement a method from a supertype @Overridei got the error : method does not override or implement a method from a supertype @Override I don't know what is my mistake .It' like i have a non-existing method of the parent class Game overriden , but i did exactly as demanded.
    • 4/29/22
    • 1251views
    • 2comments
    0
  • Arek Zieliński (abLe)
    Level 20
    Warsaw
    Question about the task Mirror image
    Java Core, Level 9, Lesson 11
    Resolved
    Why does my code not pass?Seriously I have no idea why this code is not passing. I use FileReader for reading a file's contents and also I close the FileReader stream using try-with-resources. Does anybody have any idea why it's not passing?
    • 4/27/22
    • 899views
    • 5comments
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task Writing our own ThreadFactory
    Java Multithreading, Level 8, Lesson 4
    Under discussion
    I figured out 2 parts of thisThis is what I have so far: public class Solution { public static AtomicInteger factoryNumber = new AtomicInteger(1); public static void main(String[] args) { class EmulatorThreadFactoryTask implements Runnable { @Override public void run()
    • 4/28/22
    • 535views
    • 1comment
    0
  • scriptKing
    Level 7
    Under discussion
    Secret KeyHello, I am trying to get back into this from a break but it is asking for a secret key. When i click the settings link it came up with page not found. Please help Sam
    • 4/27/22
    • 532views
    • 0comments
    0
  • LuisRC
    Level 39
    Gijón
    Question about the task Words with numbers
    Java Core, Level 9, Lesson 11
    Under discussion
    What's my mistake?Hi there, Where's the problem with my code? I've already tested it by using different word patterns (aaa, a1a, 1a2, @sd, @23, @we34) and it seems to work. The recommendation of my mentor "Be sure that your solution uses FileWriter" Am I not using it? Thanks
    • 4/19/22
    • 853views
    • 6comments
    0
  • whoseunassailable
    Level 28
    India
    Question about the task Splitting a file
    Java Core, Level 8, Lesson 5
    Under discussion
    Here's how i tried yet it failed. The code in comments is for checking whether the file is split into two and it showed 50 and 51 so ig it did? But then again i might be wrong about something here. So plz help. package com.codegym.task.task18.task1808; /* Splitting a file */ import java.io.*; import java.util.ArrayList; public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    • 4/19/22
    • 702views
    • 3comments
    0
  • Sidd
    Level 7
    Maple Valley
    Question about the task Bouncer policy
    Java Syntax, Level 4, Lesson 6
    Under discussion
    ??I have done this fine, it works in Intellij Id but on codegym it just throws exceptions I dunno why.
    • 5/15/20
    • 923views
    • 7comments
    0
  • LuisRC
    Level 39
    Gijón
    Question about the task Replacing numbers
    Java Core, Level 9, Lesson 11
    Resolved
    HelpHi there, Where's my code wrong? It didn't pass validation. btw. I was looking for the appropriate REGEX for this taks with the following conditions: * 1 dollar must be replaced by one dollar * dollar 1 must be replaced by dollar one * 1dollar must not be replaced * dollar1 must not be replaced I wo
    • 4/22/22
    • 858views
    • 4comments
    0
  • Marko Ressler
    Level 7
    Leoben
    Question about the task Filling an array
    Java Syntax, Level 6, Lesson 8
    Under discussion
    Why is this wrong?I get good results for even and odd lengths but it says it's not ok for odd ones. Anyone can help?
    • 4/14/22
    • 540views
    • 6comments
    0
  • Mary Khan
    Level 23
    Russia
    Question about the task Set of plants
    Java Syntax, Level 14, Lesson 3
    Under discussion
    Why I can't pass code validation with Arrays.AsList?Why I can't pass code validation with Arrays.AsList? public class Solution { public static void main(String[] args) { Set mySet = new HashSet(Arrays.asList("watermelon", "banana ","cherry","pear","cantaloupe","blackberry","ginseng","strawberry", "iris", "potato"));
    • 4/17/22
    • 725views
    • 3comments
    0
  • sam void mean (<_____>)
    Level 4
    United States of America
    Question about the task This age doesn't work for me…
    Java Syntax, Level 3, Lesson 4
    Under discussion
    Person person = new Person();Hi everybody, can someone explain to me this line of code ? I am having hard time understanding the main purpose of this code: Person person = new Person(); or Cat cat1 = new Cat(); Thank you , Sam
    • 2/18/22
    • 954views
    • 4comments
    0
  • LuisRC
    Level 39
    Gijón
    Question about the task Introducing tags
    Java Core, Level 9, Lesson 11
    Under discussion
    Struggling with this takHi there, I've been struggling with this task for days and still I'm not able to get it validated. Any help, please?
    • 4/16/22
    • 468views
    • 5comments
    0
  • Yordan Popov
    Level 12
    Asenovgrad
    Under discussion
    IDE error. https://drive.google.com/file/d/13BVaRD2k04dt1ZwjxJ9VXzY_xRZmeJ5K/view?usp=sharing
    • 4/12/22
    • 578views
    • 2comments
    0
  • Anthony Chalk
    Level 30
    London
    Question about the task Make a word chain
    Java Multithreading, Level 2, Lesson 9
    Resolved
    Please helpMy code works for the task example. I would have expected it to fail: All words passed to the getLine method must be included in the resulting string, if possible. as if there is a word that doesn't fit in with the word chain, I would have an infinite loop. I especially don't understand why it's f
    • 2/16/21
    • 972views
    • 6comments
    1
  • PeterC
    Level 28
    France
    Question about the task Path update
    Java Syntax, Level 9, Lesson 5
    Resolved
    Simple regex not passing.Why it does not want to pass? The result is correct.
    • 10/9/21
    • 689views
    • 4comments
    0
  • Marilyn
    Level 17
    Question about the task Maximum of four numbers
    Java Syntax, Level 4, Lesson 6
    Under discussion
    Why is the third condition not satisfied?Why is the third condition not satisfied?
    • 10/30/21
    • 813views
    • 3comments
    0
  • Radon Gawn
    Level 14
    United States of America
    Question about the task Hexadecimal converter
    Java Syntax, Level 9, Lesson 2
    Under discussion
    Can you find help me understand why this is failing the toHex(int) requirement? Can you find help me understand why this is failing the toHex(int) requirement?
    • 4/8/22
    • 596views
    • 1comment
    0
  • Nyarlathotep
    Level 34
    Question about the task Counting words
    Java Core, Level 9, Lesson 5
    Under discussion
    Local tests pass with multiple solutions but last requirement doesn't verifyHi, I have tried multiple solutions (attached is one) and tested with several local text files - using various combinations - but still fail to verify the last requirement even though I get the same results across my solutions, as well as the Codegym's solution. The core difference between my solu
    • 4/8/22
    • 546views
    • 1comment
    0
  • Kiran Kumar Alisam
    Level 1
    Erie
    Question about the task Somehow average
    Java Syntax, Level 4, Lesson 16
    Under discussion
    where am i thinking wrong in the below scenarioBufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int a= Integer.parseInt(reader.readLine()); int b= Integer.parseInt(reader.readLine()); int c= Integer.parseInt(reader.readLine()); if((a==b) && (b==c) && (a==c)){
    • 4/8/22
    • 665views
    • 1comment
    0
  • public enum WaysToDie
    Level 23
    Denver
    Question about the task Remembering geometry
    Java Syntax, Level 7, Lesson 7
    Under discussion
    Using the final keywordI have added the final keyword to all the constants in the class. Yet the code still fails
    • 12/18/21
    • 562views
    • 5comments
    0
  • Daniel Whyte
    Level 17
    Question about the task Who called me?
    Java Syntax, Level 9, Lesson 2
    Under discussion
    Thread.currentThread().getStackTrace()[2]What is the significance of referencing the number 2 in the index. My thinking would be that it wants to reference the previous stack so surely it should be a 1 because we start counting from zero?
    • 3/2/21
    • 1256views
    • 3comments
    0
  • MakinTosH
    Level 20
    Vilnius
    Question about the task Shall we play?
    Java Core, Level 6, Lesson 13
    Resolved
    Help understand the outputI get this output when I run my code. In my opinion it displays all the information correctly. What's wrong? Smith:Start game Jones:Start game Gates:Start game Gates:Gather resources Smith:Gather resources Gates:Grow economy Gates:Kill enemies Smith:Grow economy Gates:won! Jones:lost Smith:lost Pr
    • 5/7/19
    • 2150views
    • 7comments
    1
  • Jcode
    Level 27
    Under discussion
    Cat or Tiger?Below are the instructions from Java Core Level 4, Lesson 3 Type casting. Widening and narrowing conversions My question is simple yet I can't establish an answer (that makes sense to me). Why would I need a type variable as a Cat and then assign it to a new object Tiger? It's a Tiger so should a
    • 4/3/22
    • 1282views
    • 14comments
    0
  • Corly Boy
    Level 11
    Bucharest
    Question about the task Drawing a rectangle
    Java Syntax, Level 4, Lesson 6
    Under discussion
    What am I not doing right?Hi, it looks like I don't understand what I'm being asked to do. The program shows me a rectangle of 8, however it gives me the error: Be sure that you have displayed the correct number of rows. Can you guide me somehow? thanks
    • 4/5/22
    • 623views
    • 1comment
    0
  • 1
  • ...
  • 47
  • 48
  • 49
  • 50
  • 51
  • ...
  • 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