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
  • Erextor
    Level 9
    Moscow
    Question about the task Closest to 10
    Java Syntax, Level 4, Lesson 4
    Under discussion
    what is wrong?what is wrong with my answer? package com.codegym.task.task04.task0409;
    • 13.10.2020
    • 491views
    • 2comments
    0
  • Шарох
    Level 12
    Question about the task Labels and numbers
    Java Syntax, Level 4, Lesson 7
    Resolved
    Hi Coders!I solved it but I'm confused :( Why (a%2 == 0) is true for "Negative and even" ?! Why we don't write (a%2 != 0) ?
    • 13.10.2020
    • 366views
    • 2comments
    0
  • Chloe Dinh
    Level 9
    Question about the task Longest sequence
    Java Syntax, Level 8, Lesson 6
    Under discussion
    What is wrong here?I've been trying all kind of input list and the result turned out right. Yet they don't let me pass the last condition.
    • 13.10.2020
    • 417views
    • 2comments
    0
  • Tina
    Level 8
    Kosice
    Question about the task Plan to conquer the world
    Java Syntax, Level 3, Lesson 8
    Under discussion
    finally!!Hey guys! Don't forget to import necessary classes from the java.io. package. Plus, if you have a look at the console input you'll see that they passed the age as the first value, and only after that they entered a name. So you have to adapt your code to this order. I hope this will work for you 😊
    • 13.10.2020
    • 1013views
    • 1comment
    0
  • Seferi
    Level 22
    Question about the task Spaces
    Java Core, Level 8, Lesson 11
    Resolved
    Need a little help..Thanks in advance
    • 13.10.2020
    • 370views
    • 4comments
    0
  • Kelly Pepper
    Level 7
    Orlando
    Question about the task Financial expectations
    Java Syntax, Level 3, Lesson 12
    Under discussion
    Where do you input data in Intellij?If you do the project on the website there is a box at the bottom that says Input Data and contains the number 100. Where would that be in Intellij? I can't find it. The only thing I see is at the bottom in Intellij there is "Terminal", but it won't let you input the data for the program. Sorry if I
    • 13.10.2020
    • 739views
    • 2comments
    0
  • David Close
    Level 17
    London
    Question about the task Positive number
    Java Syntax, Level 4, Lesson 7
    Resolved
    output isnt correctHere my program will output 2, i am not sure why.
    • 13.10.2020
    • 438views
    • 3comments
    0
  • Lawson
    Level 29
    Lagos
    Question about the task Eliminating deadlock
    Java Multithreading, Level 7, Lesson 6
    Resolved
    Pls helpPls what's wrong with my code... it keeps saying.. " Program ran too long"
    • 10.10.2020
    • 507views
    • 1comment
    0
  • Philip Butler
    Level 32
    United Kingdom
    Question about the task How many potential friends does a person have?
    Java Collections, Level 6, Lesson 8
    Resolved
    Logic seems OK but can't get final requirement to verifyHi all, So for this one, I think I've got the logic for getFriends correct. It passes the example, and make senses with other values for the index parameter. However, I can't this to verify requirement 4. I may be misinterpretting the meaning of the deep parameter. Help please. Thanks, Phil
    • 04.12.2019
    • 1632views
    • 4comments
    2
  • David Close
    Level 17
    London
    Question about the task Three numbers
    Java Syntax, Level 4, Lesson 6
    Resolved
    Not sure why condition failedAny help regarded why the output section failed would be appreicated.
    • 13.10.2020
    • 518views
    • 2comments
    0
  • Chanda B Barrick
    Level 8
    Question about the task Moon Lander (Part 2/23)
    Games, Level 0, Lesson 4
    Under discussion
    Don't understand what is being asked for setCellColor methodHonestly, I'm not sure I understand what is being asked here: In the drawScene() method, call the setCellColor(int, int, Color) method for each cell of the playing field with the following arguments: x and y coordinates of the cell and any color (for example, Color.BLACK). I thought just had to cal
    • 21.09.2019
    • 939views
    • 2comments
    0
  • Vitalina
    Level 20
    Question about the task Duplicating words
    Java Syntax, Level 7, Lesson 9
    Under discussion
    What's wrong with my code if everything works???What's wrong with my code if everything works??? Thanks for help in advance:)
    • 10.10.2020
    • 586views
    • 4comments
    0
  • Rajni Agrawal
    Level 12
    Bangalore
    Question about the task Currency exchange
    Java Syntax, Level 3, Lesson 3
    Resolved
    How to use returned value from call in main methodThe main method should display the result of the calls, each time on a new line. convertEurToUsd(50 , 2.5); // system.out.println(dollars); this statement is not working as dollars is not defined.
    • 11.10.2020
    • 634views
    • 1comment
    0
  • Andrei
    Level 41
    Question about the task Distance between two points
    Java Syntax, Level 6, Lesson 8
    Resolved
    Solution I wrote seems OK, yes I receive the error : "The getDistance method must return the distance between the points. " Help please! import static java.lang.Math.sqrt; public class Util { public static double getDistance(int x1, int y1, int x2, int y2) { //write your code here double a = (x2-x1)*(x2-x1)+(y2-y1)*(y2-y1); Math.sqrt(a); return a; } public static void main(String[] args
    • 12.10.2020
    • 727views
    • 5comments
    0
  • Vinay
    Level 11
    Question about the task Three numbers
    Java Syntax, Level 4, Lesson 6
    Resolved
    Help Please!Last condition not meeting. I can't figure it out. Thank you.
    • 12.10.2020
    • 498views
    • 6comments
    0
  • Dinesh
    Level 7
    Delhi
    Question about the task Square of a number
    Java Syntax, Level 1, Lesson 8
    Under discussion
    Please explain the return statementpublic class Solution { public static void main(String[] args) { //write your code here int a=sqr(5); System.out.println(a); } public static int sqr(int a) { return a * a; } }
    • 12.10.2020
    • 640views
    • 1comment
    0
  • Jhoal
    Level 22
    Berlín
    Question about the task Minimum of N numbers
    Java Syntax, Level 8, Lesson 11
    Under discussion
    I'm getting an error and I don't know why :/Hi guys, I need your help again. I'm getting the NoSuchElementException. can you explain me why and how to fix it?:). Thanks in advance
    • 12.10.2020
    • 353views
    • 2comments
    0
  • Inifome
    Level 10
    Delta
    Question about the task Cat code won't compile
    Java Syntax, Level 7, Lesson 12
    Resolved
    can't get out of the loopwhat's wrong with the break ? please how can I correct my code?
    • 07.10.2020
    • 816views
    • 2comments
    0
  • Dyrits
    Level 1
    Question about the task Counting words
    Java Core, Level 9, Lesson 5
    Resolved
    Why is it not working ?Determine why the program found more instances of the word "world " than exist in the file. public class Solution { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String fileName = reader
    • 12.10.2020
    • 416views
    • 2comments
    0
  • A R
    Level 8
    Ankara
    Question about the task Expressing ourselves more concisely
    Java Syntax, Level 7, Lesson 6
    Archived
    It doesn't pass the second requestThe code is almost as Task 0708 except for the ArrayList initialization which is accepted as First step. running without verification works fine. verification says it is not reading 5 inputs from keyboard. I need some clarification.
    • 06.10.2020
    • 638views
    • 3comments
    0
  • Marius Iulian Placinta
    Level 3
    rome
    Under discussion
    Can someone tell me what did i do wrong? The output returns the right min numbers (1, -3, 3 and 5) but i still don't complete the last task "The min method must return the minimum numbers a, b, and c." Thanks package it.codegym.task.task02.task0216; /* Minimum of three numbers */ public class Solution { public static int min(int a, int b, int c) { int result; if (a<=b && a<=c) result = a; else result = b; if (b<=c && b&l
    • 12.10.2020
    • 477views
    • 1comment
    0
  • Lawson
    Level 29
    Lagos
    Question about the task Lonely arrays interact
    Java Syntax, Level 7, Lesson 4
    Under discussion
    pls helpPls I can't find my error
    • 04.08.2020
    • 516views
    • 4comments
    0
  • Seferi
    Level 22
    Question about the task Table
    Java Core, Level 8, Lesson 8
    Resolved
    Help is greatly appreciatedThanks in advance...
    • 11.10.2020
    • 464views
    • 1comment
    0
  • Ian De Bie
    Level 28
    Austin
    Resolved
    Where can I see other people's solutions for problems that I have completed?Obviously, once you solve a problem, that is great and all, but in order to improve coding it would be nice to see how other people solved it to compare styles and pick up new ideas for future similar problems.
    • 27.06.2020
    • 642views
    • 3comments
    0
  • Ian De Bie
    Level 28
    Austin
    Question about the task Sorting even numbers from a file
    Java Core, Level 3, Lesson 11
    Resolved
    help me understand why the test is failing?why doesn't the test seem to recognize the fact that i am using a try resource block that will close the fileinputstream automatically? are we note supposed to use try resource blocks anymore?
    • 29.08.2020
    • 584views
    • 1comment
    0
  • Ian De Bie
    Level 28
    Austin
    Question about the task Writing to a file from the console
    Java Core, Level 3, Lesson 11
    Resolved
    is there a better way to write this?i ended up with a do while loop, but it looks awkward to me. is there a better way to do it? public class Solution { public static void main(String[] args) throws IOException { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try (BufferedWriter file
    • 29.08.2020
    • 382views
    • 1comment
    0
  • gh0stl0nely
    Level 23
    Toronto
    Question about the task Changing functionality
    Java Syntax, Level 7, Lesson 12
    Resolved
    Code ran perfectly but 2nd conditions were not met. Any ideas?package com.codegym.task.task07.task0727; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /* Changing functionality */ public class Solution { public static void main(String[] args) throws IOException { Buffere
    • 22.08.2020
    • 557views
    • 2comments
    0
  • Bohdan
    Level 8
    Milan
    Question about the task Space Invaders (Part 5/34)
    Games, Level 0, Lesson 6
    Resolved
    What is the problem in draw method?.
    • 04.09.2020
    • 818views
    • 2comments
    2
  • Edddieg
    Level 15
    Providence
    Question about the task Don't think about seconds…
    Java Syntax, Level 3, Lesson 8
    Resolved
    please helpWrite code that calculates how many seconds have passed since 3:00 PM when the clock says it's 3:30 PM. Display the result. Requirements: • The program should output text. • The displayed text should be a positive integer. • The displayed number must be a multiple of 60. • The displayed number must
    • 07.06.2020
    • 862views
    • 5comments
    0
  • Azhar Iqbal
    Level 18
    Multan
    Question about the task Greater than 10? You're not a good fit for us
    Java Syntax, Level 8, Lesson 8
    Resolved
    Cannot figure out where the problem isIf any one know where the problem is kindly let me know how to solve it.
    • 05.09.2018
    • 2915views
    • 9comments
    0
  • 1
  • ...
  • 125
  • 126
  • 127
  • 128
  • 129
  • ...
  • 372
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