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
  • hidden #10412202
    Level 8
    Question about the task Shortest or longest
    Java Syntax, Level 7, Lesson 6
    Under discussion
    Code runs correctly, test fails package com.codegym.task.task07.task0712; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /* Shortest or longest */ public class Solution { public static void main(String[] args) throws Exception { //write you
    • 12/25/18
    • 1619views
    • 10comments
    0
  • Paul
    Level 24
    Vienna
    Question about the task Our first converter!
    Java Syntax, Level 2, Lesson 2
    Resolved
    saving a value in a doubleI don't really get the idea, why saving the result of this calculation in a double doesn't give me the right result: double a = 9/5 ; shouldn't it be the same as : double a = 9/5.0 ; Still I get totally different results and I am wondering why.
    • 10/15/19
    • 995views
    • 2comments
    0
  • Timothy Strong
    Level 4
    San Diego
    Question about the task Minimum of three numbers
    Java Syntax, Level 2, Lesson 8
    Under discussion
    I do know what I am doing wrong?package com.codegym.task.task02.task0216; /* Minimum of three numbers */ public class Solution { public static int min(int a, int b, int c) { int min; if (a <= b && a <= c);{ min = a;} if (b <= c && b <= a);{
    • 10/13/19
    • 1426views
    • 3comments
    0
  • Vahan
    Level 41
    Tbilisi
    Question about the task Table
    Java Core, Level 8, Lesson 8
    Resolved
    How to display the number of elements in the list? None of the solutions (in the comments) were verified! Are there any more?public class Solution { public class TableInterfaceWrapper implements TableInterface { TableInterface rows; public TableInterfaceWrapper (TableInterface rows) { this.rows = rows; } public void setModel(List rows) { // int sizeOfList = row
    • 10/21/19
    • 1081views
    • 2comments
    0
  • hidden #10481736
    Level 4
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Under discussion
    Trying to use a Math function to solveI get the following error when I use the floor function: com/codegym/task/task04/task0416/Solution.java:17: error: incompatible types: possible lossy conversion from double to int int a = Math.floor(t); I've tried making t a double and a float, and adjusting from input.nextDouble to input.
    • 10/15/19
    • 1495views
    • 2comments
    0
  • Patrick freeman
    Level 14
    Buffalo
    Question about the task One large array and two small ones
    Java Syntax, Level 7, Lesson 4
    Under discussion
    Not understanding how to copy arrays into other arraysI'm struggling to understand the final condition "The program must copy one half of the large array into the first small array, copy the second half into the second array, and then display that array on the screen.". I relied heavily on another question to get this far, and I just don't understand w
    • 10/19/19
    • 1292views
    • 1comment
    0
  • Azamat Aminov
    Level 1
    Tashkent
    Question about the task Console-based piggy bank
    Java Syntax, Level 5, Lesson 12
    Resolved
    Please help me I couldn't find mistake?import java.io.InputStreamReader; import java.util.Scanner; /* Console-based piggy bank */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String name = reader.read
    • 4/5/19
    • 1940views
    • 2comments
    0
  • Ivan
    Level 22
    Nope
    Question about the task Changing functionality
    Java Syntax, Level 7, Lesson 12
    Resolved
    Printing hurdleGuys, what am i doing wrong?
    • 10/18/19
    • 1443views
    • 5comments
    0
  • Sargam
    Level 3
    Aligarh
    Question about the task Our first converter!
    Java Syntax, Level 2, Lesson 2
    Resolved
    can't identify my mistakecan't find the error in the formula used i.e. TF=(9/5*celsius)+32
    • 10/15/18
    • 2218views
    • 12comments
    0
  • Mathis Longino
    Level 16
    Hanover
    Question about the task Playing Javarella
    Java Syntax, Level 7, Lesson 9
    Resolved
    What am I doing wrong with the initialization?Hey guys and girls, I have no idea where I am wrong with my solution. The code works perfectly fine. I tried to declare and initialize the lists seperately (e.g. ArrayList<Integer> list = new ArrayList<Integer>();) followed by value-input through the methods in the following lines. In t
    • 10/19/19
    • 1181views
    • 2comments
    0
  • Jimmy Phan
    Level 7
    Atlanta
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Under discussion
    Why are all 3 of my requirements marked off?I know there might be a shorter way to do it but I've decided to do it the longer way lol. All input numbers, 2.5, 3, 4, 5, 60 were inputted and it worked. anything outside of the condition < 0 or > 60 does not work. Any advise? Thanks.
    • 10/21/19
    • 1142views
    • 1comment
    0
  • James Mackenzie
    Level 7
    Victoria
    Question about the task R or L
    Java Syntax, Level 7, Lesson 9
    Resolved
    Logic error? unable to duplicate?the list.add(list.get(i)); Section i feel like it adds it to the end of the list however when it returns it on completion it outputs as if it hasn't been added. what am i missing.
    • 10/17/19
    • 1379views
    • 2comments
    0
  • Anthony Chalk
    Level 30
    London
    Question about the task Notepad for new ideas
    Java Syntax, Level 6, Lesson 11
    Under discussion
    I'm so confusedI'm not too sure what's required here and how this is supposed to work, please help. Thank you
    • 10/20/19
    • 1212views
    • 3comments
    0
  • Michael
    Level 10
    Dresden
    Question about the task Do we have a pair?
    Java Syntax, Level 4, Lesson 4
    Resolved
    Tasks resolved, but code does not validateTasks resolved, but code does not validate. Why? Any idea?
    • 10/13/19
    • 1353views
    • 5comments
    2
  • kapil
    Level 12
    delhi
    Question about the task Distance between two points
    Java Syntax, Level 6, Lesson 8
    Resolved
    problem while verifying...problem.....getDistance method should return distance between points. i have checked the code running in intellij perfectly fine.
    • 10/27/18
    • 2427views
    • 4comments
    0
  • abhijith arjun
    Level 12
    DeKalb
    Question about the task Longest string
    Java Syntax, Level 7, Lesson 6
    Archived
    3 and 4th conditions are not satisfyingplz help
    • 8/12/19
    • 1084views
    • 1comment
    0
  • Meera
    Level 5
    Bantval
    Under discussion
    Question about IntelliJ Idea Community frameworkI had downloaded the Community framework version 2018.2.2. However, when I open the application, I get the below error. Failed to load JVM DLL\bin\server\jvm.dll If you already have a 32-bit JDK installed, define a JAVA_Home variable in Computer> System Properties > System Settings > Envi
    • 9/10/19
    • 1651views
    • 1comment
    0
  • Tasnuba Anika
    Level 3
    New York City
    Question about the task Where does a Person come from?
    Java Syntax, Level 2, Lesson 2
    Under discussion
    How to write objectsIn the Person class, declare the following variables: String name, int age, int weight, int money. In the main method, create a Person object and store a reference to it in the variable person. Hint: Use the following construct to create a Person object and assign a reference to that object to the
    • 10/19/19
    • 2332views
    • 1comment
    0
  • Anonymous #10011987
    Level 16
    Question about the task Census
    Java Syntax, Level 8, Lesson 8
    Under discussion
    Unable to get correct answer for HashMapI have no idea based on the code I have written, why it is giving an error for the third condition. I have specified 10 entries as (last name, first name) pair. Thanks in advance.
    • 10/18/19
    • 1354views
    • 4comments
    0
  • Patrick freeman
    Level 14
    Buffalo
    Question about the task String array in reverse order
    Java Syntax, Level 7, Lesson 4
    Resolved
    Failing requirement to "display 10 strings, each on a new line"Hello, I keep failing the condition "The program should display 10 strings, each on a new line.". In IntelliJ, it does display 10 strings, and this is the final output if my inputs are string1,string2, etc.: Peter Bishop Walter Bishop string8 string7 string6 string5 string4 string3 string2 string1
    • 10/18/19
    • 1347views
    • 2comments
    0
  • Revathy S
    Level 4
    trivandrum
    Question about the task Plan to conquer the world
    Java Syntax, Level 3, Lesson 8
    Under discussion
    pls helpimport java.io.*; import java.util.*;
    • 10/18/19
    • 1259views
    • 2comments
    0
  • Anonymous #10011987
    Level 16
    Question about the task Longest sequence
    Java Syntax, Level 8, Lesson 6
    Under discussion
    Unable to get correct answer for Longest Sequence program using ArrayListI am not able to get a correct solution for my current code. I am using the easiest possible solution for the given problem, using an ArrayList. Thanks in advance. Error: It is telling me to check if my code works for numbers > 127, or not. But I have already set the data type as Integer. It's r
    • 10/17/19
    • 1312views
    • 5comments
    0
  • Anonymous #10386685
    Level 9
    Question about the task Longest string
    Java Syntax, Level 7, Lesson 6
    Archived
    What is Wrong?It meets the conditions. What is wrong?
    • 11/26/18
    • 1776views
    • 4comments
    1
  • Dusernajder
    Level 20
    Budapest
    Question about the task Prices
    Java Core, Level 8, Lesson 11
    Under discussion
    It works for meI am not sure why are those requirements not validating.
    • 10/13/19
    • 1315views
    • 1comment
    0
  • Carlos Cortázar
    Level 17
    Madrid
    Under discussion
    executing linux commands from javaI am trying to execute a linux command from my java class using the method exec() from the Runtime class in this way: ////////////////////////////// public static String xxUtilInfoFile (String sPath , String sFileName) throws Exception { Runtime r = null; Process p = nu
    • 10/18/19
    • 948views
    • 1comment
    0
  • John
    Level 27
    Washington DC
    Question about the task Five winners
    Java Syntax, Level 8, Lesson 11
    Resolved
    Why is my code not correct? I tried this in eclipse and it outputs correctly.Why is my code not correct? I tried this in eclipse and it outputs correctly.
    • 10/3/19
    • 1440views
    • 2comments
    0
  • vladimir.plamadeala@endava.com
    Level 10
    Chisinau
    Question about the task Census
    Java Syntax, Level 8, Lesson 8
    Resolved
    Why is two last conditions do not verify? In IntelliJ seems to work fine.package com.codegym.task.task08.task0815; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; /* Census */ public class Solution { public static HashMap createMap() { HashMap map = new HashMap<>(); map.put("Moldova", "Ian"); map
    • 10/17/19
    • 1579views
    • 3comments
    0
  • Han
    Level 24
    Question about the task Adding a file to an archive
    Java Collections, Level 1, Lesson 6
    Resolved
    The task doesn't compile on server (but it does on my machine)So when I try to submit this code I get the following error: Error in com/codegym/task/task31/task3105/Solution.java on line 34 cannot find symbol symbol: method readAllBytes() location: variable zipIs of type java.util.zip.ZipInputStream Anyone an idea what I'm doing wrong?
    • 10/17/19
    • 2892views
    • 4comments
    0
  • tony
    Level 20
    Nis
    Question about the task Faster together? We'll see :)
    Java Core, Level 7, Lesson 2
    Resolved
    need helpAny idea of how to solve the third requirement?
    • 3/5/19
    • 1435views
    • 3comments
    0
  • Anthony Chalk
    Level 30
    London
    Question about the task Even and odd digits
    Java Syntax, Level 6, Lesson 5
    Under discussion
    I can't find the problemI'm really not sure what's wrong with the code.
    • 10/17/19
    • 1142views
    • 2comments
    0
  • 1
  • ...
  • 269
  • 270
  • 271
  • 272
  • 273
  • ...
  • 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