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
  • Ahmed Mujtaba Butt
    Level 0
    Question about the task 2048 (Part 7/18)
    Games, Level 0, Lesson 2
    Resolved
    Solution not PassingIt seems to me that I have written the correct solution but it isn't letting me pass through. private boolean compressRow(int[] row) { int[] newRow = {0, 0, 0, 0}; int i = 0; for (int x = 0; x < 4; x++) { while (row[x] != 0 && i < 4) {
    • 9/7/21
    • 935views
    • 4comments
    0
  • Ahmed Mujtaba Butt
    Level 0
    Question about the task 2048 (Part 18/18)
    Games, Level 0, Lesson 2
    Under discussion
    Run 2048 in NetBeans 7.4I have written the code for 2048 now I want to run it in NetBeans IDE 7.4. Is it possible?
    • 9/15/21
    • 503views
    • 1comment
    0
  • Christophsnz
    Level 9
    Germany
    Question about the task Minesweeper (Part 13/16)
    Games, Level 0, Lesson 0
    Under discussion
    Requirement 6. is not matchingCan anyone help me out here? i can't see the problem
    • 8/30/21
    • 754views
    • 1comment
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task Shall we play?
    Java Core, Level 6, Lesson 13
    Resolved
    Hm, not working for first and third conditionsMy results when the code is run: Smith:Start game Jones:Start game Gates:Start game Gates:Gather resources Smith:Gather resources Gates:Grow economy Gates:Kill enemies Gates:won! Jones:lost Smith:lost One thing I wasn't sure if is if we're supposed to sleep before a line is printed or after, but it
    • 9/13/21
    • 773views
    • 3comments
    0
  • Nandini
    Level 3
    United States of America
    Question about the task Minimum of four numbers
    Java Syntax, Level 2, Lesson 8
    Under discussion
    can anyone help me package com.codegym.task.task02.task0217; /* Minimum of four numbers */ public class Solution { public static int min(int a, int b, int c, int d) { //write your code here int e = min( a, b); if((a<=b) && (a<=c) && (a<=d)) {
    • 9/13/21
    • 480views
    • 1comment
    0
  • Hannah Fadlon
    Level 3
    Question about the task Implement the print method
    Java Syntax, Level 2, Lesson 1
    Under discussion
    Why when I print s I get the wanted output? I don't understand... We didn't make String s= "Java something something"; So we do I get that as me output? What am I missing here?
    • 9/12/21
    • 722views
    • 3comments
    0
  • catalinene
    Level 29
    Greven
    Question about the task Shall we play?
    Java Core, Level 6, Lesson 13
    Under discussion
    Ouput looks good but fails testingOutput: Smith Start game Jones Start game Gates Start game Gates Gather resources Smith Gather resources Gates Grow economy Gates Kill enemies Gates:won! Jones:lost! Smith:lost!
    • 2/29/20
    • 1409views
    • 2comments
    0
  • J
    Level 41
    Wilson
    Question about the task Building a file
    Java Core, Level 8, Lesson 11
    Under discussion
    Copying to new fileWhy are the files not being copied and added to the new file?
    • 9/11/21
    • 570views
    • 2comments
    0
  • NaeRae
    Level 11
    Question about the task Greater than 10? You're not a good fit for us
    Java Syntax, Level 8, Lesson 8
    Under discussion
    Why is the copy necessary?I wanted to not make a copy of the set in the removeAllNumbersGreaterThan10 and do the method on the same set given to it. but it returns these errors: Exception in thread "main" java.util.ConcurrentModificationException at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1584) at
    • 9/9/21
    • 496views
    • 3comments
    0
  • Nashid Kp
    Level 2
    Manjeri
    Question about the task Minimum of three numbers
    Java Syntax, Level 2, Lesson 8
    Under discussion
    pls ExplainCan any one explain this part👇🏽pls int m1 = a < b ? a : b; int m2 = m1 < c? m1 : C;
    • 9/10/21
    • 856views
    • 2comments
    0
  • Henk
    Level 19
    Pretoria
    Question about the task Method in a try-catch
    Java Syntax, Level 9, Lesson 11
    Resolved
    not sure what's wrong ?Please assist
    • 5/6/19
    • 1951views
    • 5comments
    3
  • Cz Ferencz
    Level 12
    Bucharest
    Question about the task Multiplication table
    Java Syntax, Level 4, Lesson 10
    Under discussion
    Initialization of variablesI can not state how important it is to initialize var just before while loop for next while loop. I had been working for at least 1 hour on this, to just realize, i should have not initialized both variables at the same time. Good luck out there.
    • 12/4/19
    • 2101views
    • 3comments
    2
  • Indranil Chakraborty
    Level 3
    United Kingdom
    Question about the task Contract
    Java Syntax, Level 1, Lesson 6
    Under discussion
    Please help I don’t get what I’m doing wrong😑
    • 8/23/21
    • 622views
    • 3comments
    0
  • Alicia Jackson
    Level 1
    Chico
    Question about the task No comments needed
    Java Syntax, Level 0, Lesson 8
    Under discussion
    I don't get it...even after solving it.I more or less understand my System.out.println(x); is 12, but I don't understand why System.out.println(y); is 2...it doesn't make sense at all.. what am I missing??
    • 9/9/21
    • 677views
    • 1comment
    0
  • Vo
    Level 41
    Sofia
    Question about the task Sokoban (part 16)
    Java Collections, Level 10, Lesson 15
    New
    Thread exceptionHello, From time to time I am getting thread exception (see below). It happens when running the code. If no exception is thrown, everything works as intended. Where did I go wrong? Thanks Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.codegym.task.task34.task3410
    • 9/10/21
    • 543views
    • 0comments
    0
  • Björn
    Level 1
    Aachen
    Question about the task Dividing by zero
    Java Syntax, Level 9, Lesson 11
    Under discussion
    still got an ArithmeticException... Why? public static void main(String[] args) { try { divideByZero(); } catch (ArithmeticException e) { e.printStackTrace(); } }
    • 4/14/20
    • 1183views
    • 1comment
    2
  • Gellert Varga
    Level 23
    Szekesfehervar
    Question about the task Pharmacy
    Java Core, Level 7, Lesson 10
    Under discussion
    Is the 'volatile' keyword necessary in this task or not? The requirements didn't say about this, but i changed these three variables to volatile: - static DrugController drugController (in Solution class) - static boolean isStopped (in Solution class) - static Map allDrugs (in DrugController class). My solution was accepted with these changes. Bu
    • 9/8/21
    • 534views
    • 1comment
    0
  • Vitalina
    Level 20
    Question about the task Notes
    Java Core, Level 7, Lesson 2
    Resolved
    What's wrong?Hi! AFter running my program it shows - "Time out. The program ran too long and was closed." But it seems that I did all conitions. so what's wrong? thanks in advance!
    • 9/3/21
    • 570views
    • 2comments
    0
  • X Khan
    Level 8
    Palmdale
    Question about the task Flip the array
    Java Syntax, Level 7, Lesson 4
    Under discussion
    The last two condition do no pass. But when I run it, it does exactly what's asked. What am I missing?I was able to create an array of 10 numbers. Then I was able to allow for input of those 10 number from the keyboard. When I run the code in intelliJ it does what's asked in terms of displaying the numbers in reverse order, with each number on a new line. However, when I verify the solution/task th
    • 9/7/21
    • 448views
    • 2comments
    0
  • Justin Smith
    Level 41
    Greenfield, USA
    Question about the task Consecutive threads
    Java Core, Level 6, Lesson 13
    Resolved
    What do I apply .join() to?We're supposed to .join() each created SleepingThread object. But this code actually does something completely different from any of the previous tasks and I'm not sure what to do in this case. Usually when we create a new Thread or something inheriting Thread, it's using syntax sort of like Threa
    • 9/6/21
    • 713views
    • 3comments
    0
  • Matvey
    Level 0
    Under discussion
    Müller-Lyer illusion in JavaI am taking an AP computer programming class and one of the codes I have to write is as follows, could someone please help me and write it because I am quite stuck, thank you: The Müller-Lyer illusion is caused by an image that consists of two parallel line segments. One line segment looks like an
    • 9/7/21
    • 699views
    • 4comments
    0
  • Dinesh
    Level 7
    Delhi
    Under discussion
    Unable to print the default value of the char data type class DefaultValues{ static boolean bl; static byte b; static short s; static int i; static long l; static float f; static double d; static char ch; static String str; public static void main(String[]args){ System.out.println("Default value of Boolean:->"+
    • 9/6/21
    • 531views
    • 1comment
    0
  • user 2710
    Level 4
    Question about the task Task with percentages
    Java Syntax, Level 3, Lesson 3
    Resolved
    why 1.1? i solve the task but i dont understand why return i * 1.1; how 1.1 How did you get 1.1 in detail?
    • 9/5/21
    • 629views
    • 3comments
    0
  • user 2710
    Level 4
    Resolved
    why is 17/100 not 0.17? result 0.0?i writed double x = (17/100) * 888; return x . as a result 0.0 . why even if only x = 17/100 , will be as result 0.0 ? i already finished this task, but I am very interested in why this is so.
    • 9/3/21
    • 458views
    • 2comments
    0
  • user 2710
    Level 4
    Question about the task Multiplication table
    Java Syntax, Level 3, Lesson 6
    Under discussion
    i did it!!! without loops. like in task.
    • 9/6/21
    • 681views
    • 3comments
    0
  • Zach
    Level 22
    Fort Collins
    Question about the task CRUD
    Java Core, Level 7, Lesson 10
    Under discussion
    Can't get the last task to pass....Any help is appreciated.
    • 9/6/21
    • 631views
    • 3comments
    0
  • Zach
    Level 22
    Fort Collins
    Question about the task Clew
    Java Core, Level 6, Lesson 13
    Under discussion
    Only Thread2 is passing at the moment....Any help would be appreciated. Thanks in advance.
    • 9/5/21
    • 484views
    • 1comment
    0
  • Zach
    Level 22
    Fort Collins
    Question about the task Clew
    Java Core, Level 6, Lesson 13
    Resolved
    Static Threads??Am I on the right track? Do you have to make the Threads static if you put them in a static block. Thanks in advance.
    • 9/2/21
    • 864views
    • 2comments
    0
  • James
    Level 41
    Not in list
    Question about the task CashMachine (part 12)
    Java Collections, Level 9, Lesson 15
    Resolved
    What's wrong here?I've ran the program several times and it appears to pass all the task conditions but it will not verify. I eventually tried to use the model solution, but even that won't pass. Please help me figure out what's wrong.
    • 6/12/21
    • 638views
    • 0comments
    0
  • Victor Omoha
    Level 8
    Raleigh
    Question about the task Playing Javarella
    Java Syntax, Level 7, Lesson 9
    Resolved
    i need help with passing the 4th requirementpackage com.codegym.task.task07.task0713; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /* Playing Javarella */ public class Solution { public static void main(String[] args) throws Exception { //write your code h
    • 9/2/21
    • 537views
    • 2comments
    0
  • 1
  • ...
  • 61
  • 62
  • 63
  • 64
  • 65
  • ...
  • 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