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
  • Piyush Mahajan
    Level 9
    Mesa
    Question about the task Minimum number of statics
    Java Syntax, Level 6, Lesson 11
    Under discussion
    Can i access static variable from non static function. My below program is working but i have confusion for method 4 accessing a static variable.package com.codegym.task.task06.task0616; /* Minimum number of statics */ public class Solution { public static int step; public static void main(String[] args) { method1(); } public static void method1() { method2(); } public static void method2() {
    • 08.01.2020
    • 969views
    • 1comment
    0
  • ron_villela
    Level 21
    Miami
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Under discussion
    not seeing where this is incorrect....sample input is output correctly on IntelliJ....package com.codegym.task.task05.task0532; import java.io.*; /* Task about algorithms */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(
    • 03.08.2021
    • 469views
    • 4comments
    0
  • Chris
    Level 19
    Newark
    Question about the task Static cats
    Java Syntax, Level 6, Lesson 11
    Under discussion
    Unsure of how to solve the last step.If someone can walk me through the last step it would be greatly appreciated.
    • 02.05.2021
    • 837views
    • 3comments
    0
  • Andrei
    Level 41
    Question about the task Rollback
    Java Collections, Level 9, Lesson 9
    Resolved
    Is there something wrong with my logic? Because it does what the requirements are.I have even compared it to the solution , and they seem quite similar in output. Maybe I am missing something?
    • 02.08.2021
    • 378views
    • 2comments
    0
  • Josephine
    Level 26
    Normal
    Question about the task Snake (Part 18/20)
    Games, Level 0, Lesson 1
    Resolved
    I have no idea why UP and DOWN Direction not passing...I have no idea why UP and DOWN Direction not passing....Someone please help .I am stuck at part18 of snake game
    • 05.11.2020
    • 706views
    • 2comments
    0
  • Сергей
    Level 24
    Kryvyy Rih
    Question about the task Word search
    Java Core, Level 10, Lesson 10
    Under discussion
    Can somebody help me?I've got the right answer, but still not pass verification.
    • 28.07.2021
    • 494views
    • 2comments
    0
  • Ryan Palmer
    Level 20
    Philadelphia
    Question about the task Fix the bugs
    Java Core, Level 8, Lesson 5
    Under discussion
    Another Comprehension check Would someone be willing to see if my explanation of what is happening is accurate? 1. if (inputStream.available() > 0) { // Read the entire file in one batch 2. byte[] buffer = new byte[inputStream.available()]; 3. int count = inputStream.read(buffer); 4.
    • 01.08.2021
    • 494views
    • 1comment
    0
  • Ryan Palmer
    Level 20
    Philadelphia
    Question about the task Maximum byte
    Java Core, Level 8, Lesson 3
    Resolved
    Comprehension questionCould someone help understand these lines of code? int[] byteCountArray = new int[256]; try (FileInputStream fileInputStream = new FileInputStream(fileName)) { while (fileInputStream.available() > 0) { byteCountArray[fileInputStream.read()] += 1;
    • 31.07.2021
    • 400views
    • 5comments
    0
  • Shashikant Sharma
    Level 8
    Surat
    Question about the task Arithmetic mean
    Java Syntax, Level 5, Lesson 5
    Resolved
    What's The Problem Here?🤨Why Does The Last Condition Doesn't Met Even Though The Output Is Correct?
    • 31.07.2021
    • 436views
    • 4comments
    0
  • #mr.coder
    Level 5
    Question about the task 2048 (Part 1/18)
    Games, Level 0, Lesson 2
    Under discussion
    javawhere is java use?
    • 21.07.2021
    • 525views
    • 2comments
    0
  • Michaela Obertova
    Level 30
    Palo Alto
    Question about the task MVC (part 4)
    Java Multithreading, Level 4, Lesson 14
    Resolved
    Last condition no verifyingHi, does someone please know why the last condition isn't verifying for me? Thanks
    • 28.07.2021
    • 597views
    • 2comments
    0
  • NNAMDI HENRY
    Level 6
    ABUJA
    Question about the task Improving functionality
    Java Syntax, Level 5, Lesson 12
    Resolved
    CONFUSED!what is wrong with my code? It issues an error saying: ")" expected in line 31 position 861. I need solution to this peoblem.
    • 29.07.2021
    • 527views
    • 2comments
    0
  • Jomar Tayactac
    Level 5
    Winnipeg
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Under discussion
    What's wrong with my code? I seem to satisfy all the requirements but it won't give me all the check marks.import java.io.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); double num = Double.valueOf(reader.readLine()); double time = num % 5; if (time <=
    • 28.07.2021
    • 813views
    • 2comments
    0
  • Zach
    Level 22
    Fort Collins
    Question about the task Constructor
    Java Syntax, Level 5, Lesson 9
    Under discussion
    Why am I getting a nullpointer exception?The class inside of a class is confusing me. Thanks in advance. package com.codegym.task.task05.task0523; /* Constructor */ public class Circle { public Color color; public static void main(String[] args) { Circle circle = new Circle(); circle.color.setDescription("Re
    • 14.03.2021
    • 851views
    • 5comments
    0
  • Daniel
    Level 41
    Rybnik
    Question about the task Log parser (part 1)
    Java Collections, Level 7, Lesson 15
    New
    Looks good but validator won't let me go on!Hi guys! Actually I have no idea what is wrong with my solution as I checked it with various logs in file - could you take a look please ? Any help would be appreciated!
    • 29.07.2021
    • 378views
    • 1comment
    0
  • Andrei
    Level 41
    Question about the task Let's recall inheritance
    Java Multithreading, Level 4, Lesson 9
    Resolved
    Logic halp plesSolution class extends C, i know, I just deleted the inheritance so I can verify the code so it shows here. Anyway, I solved the problem but I don't understand the following: 1. How is CCB printed considering that nothing from C class is called. Is it because when a Solution class objec
    • 12.04.2021
    • 1154views
    • 3comments
    0
  • Alexander Lieder
    Level 7
    Leipzig
    Resolved
    Change course language to EnglishHello. Is it possible to change the language for the course and the tasks? I started the course in German, but I'd like to continue in English, however, there seems to be no option for that in the settings. I tried setting the interface language in the bottom right corner to English, that does not c
    • 23.10.2020
    • 980views
    • 3comments
    1
  • Darko Jakimovski
    Level 18
    Kriva Palanka
    Question about the task Creating threads recursively
    Java Core, Level 6, Lesson 13
    Resolved
    Can't see my mistakeI only get one line of output. I revisited each line a couple of times and can't find what's the problem. It only creates one object WhyTheFace?!
    • 22.05.2019
    • 1877views
    • 6comments
    1
  • NOBODY
    Level 5
    Question about the task Initializing objects
    Java Syntax, Level 5, Lesson 7
    Under discussion
    still tryinganybody?
    • 27.10.2020
    • 563views
    • 4comments
    0
  • Vlad
    Level 29
    Khon Kaen
    Question about the task CRUD 2
    Java Core, Level 7, Lesson 10
    Resolved
    i dont see anything wrong with this but 5 & 6 wont passplease help
    • 28.07.2021
    • 717views
    • 2comments
    0
  • Abdelrahman
    Level 5
    Amman
    Question about the task Initializing cats
    Java Syntax, Level 5, Lesson 7
    Under discussion
    helpI haven't continued yet but I have run into an issue so since I already have public void initialize(String name, int weight, int age) Typed in line 18 I cant type public void initialize(String name, int age, int weight) On line 23 but its what its asking from me so any hint on what to do
    • 14.03.2021
    • 826views
    • 2comments
    0
  • Andrei
    Level 41
    Question about the task The long forgotten Array
    Java Collections, Level 7, Lesson 10
    Under discussion
    What is the difference between returning the solution and returning an initialized array ? In line 20, I wanted to return return new Number[]{4,5,6}; but the mentor wouldn't accept my version. Why is that? package com.codegym.task.task37.task3706; import java.util.Arrays; import java.util.List; /* The long forgotten Array */ public class Solution { public static void ma
    • 26.07.2021
    • 537views
    • 5comments
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task 2048 (Part 11/18)
    Games, Level 0, Lesson 2
    Resolved
    This is a tough oneI am having a harder time with this than any other task. I want to do this with a loop, but I had to find a pattern first so I wrote out all 16 parts of the rotation. It seems like I found the pattern but it still won't validate. In the example, I am assuming that gameField[0] is the first array, {
    • 26.07.2021
    • 524views
    • 2comments
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task 2048 (Part 6/18)
    Games, Level 0, Lesson 2
    Under discussion
    Why do we invert gameField[x][y] to gameField[y][x]? It produces wrong cell referenceMy code passed validation so I can't attach any code. I'm less concerned about validation than about the code making sense. I have added some simple println statements to get the two cells that are set. Here is one example with a screenshot of the board: When I test the values I get: gameField[1][0
    • 26.07.2021
    • 753views
    • 4comments
    0
  • Mukesh Vudayagiri
    Level 10
    Ferokh
    Question about the task Implement the fight method
    Java Syntax, Level 5, Lesson 5
    Under discussion
    What's wrong in this code. Help needed.Somebody help me with this. It's not accepting the code. What's wrong with this. I cannot find (It's showing "If cat1 beats cat2, then cat2 must lose to cat1.").
    • 28.08.2018
    • 2545views
    • 13comments
    1
  • Evgen
    Level 23
    Question about the task Number algorithms
    Java Core, Level 10, Lesson 10
    New
    problem with output of Long.MAX_VALUEI check program for many input values, for max integer it works fine, but it didn't output the last 7 numbers for max long
    • 26.07.2021
    • 496views
    • 0comments
    0
  • David
    Level 5
    Question about the task Sorting three numbers
    Java Syntax, Level 4, Lesson 6
    Under discussion
    Last condition was not validated[x] "The program should display the numbers in descending order." package com.codegym.task.task04.task0420; /* Sorting three numbers */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader
    • 26.07.2021
    • 655views
    • 1comment
    0
  • David
    Level 5
    Question about the task You can't have too much of a good thing
    Java Syntax, Level 4, Lesson 10
    Under discussion
    Any idea where is the issue in my code?[Failed] "The program should display the string N times." package com.codegym.task.task04.task0432; /* You can't have too much of a good thing */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here Bu
    • 26.07.2021
    • 489views
    • 1comment
    0
  • NaTasia Madison
    Level 8
    Atlanta
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Under discussion
    Not understanding the arrays in the solutionCan someone explain step by step please.
    • 26.07.2021
    • 325views
    • 0comments
    0
  • Liliane Top
    Level 24
    Amsterdam
    Question about the task Sequential file output
    Java Core, Level 6, Lesson 13
    Under discussion
    3 questions about this task1) // ReadFileInterface f = new ReadFileThread();// why do we have ReadFileInterface instead of ReadFileThread? ReadFileThread f = new ReadFileThread();//this makes more sense to me to use the reference datatype as ReadFileTRead instead of the interface. 2) This gives the same output as the
    • 26.12.2020
    • 740views
    • 8comments
    0
  • 1
  • ...
  • 62
  • 63
  • 64
  • 65
  • 66
  • ...
  • 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