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
  • Kira
    Level 1
    Schaumburg
    Question about the task Let's change the code
    Java Syntax, Level 1, Lesson 4
    Under discussion
    Second variable?My code is working. I dont need to declare the second variable.
    • 08.10.2018
    • 1576views
    • 6comments
    1
  • Thomas
    Level 12
    Gent
    Question about the task We don't need repeats
    Java Syntax, Level 8, Lesson 8
    Under discussion
    I keep getting an error. I guess i don't completely understand iteratorCan anyone help me? these tasks with iterator and maps are keeping me bussy...
    • 02.04.2019
    • 1443views
    • 3comments
    0
  • pax
    Level 3
    Bratislava
    Question about the task Minimum of three numbers
    Java Syntax, Level 2, Lesson 8
    Resolved
    Can't find the mistake in my solutionCode executes without error but fails the last condition.
    • 08.04.2019
    • 1279views
    • 3comments
    0
  • stjepang
    Level 8
    Sveti Iija
    Question about the task Display the square of a number
    Java Syntax, Level 1, Lesson 3
    Under discussion
    the server won't accept my solution. What is wrong in this simple code?package com.codegym.task.task01.task0140; /* Display the square of a number */ public class Solution { public static int number = 25; public void main(String[] args) { //write your code here System.out.println(number); System.out.println(number * number); }
    • 26.03.2019
    • 1780views
    • 5comments
    0
  • Djole
    Level 41
    Belgrade
    Question about the task UnsupportedFileName
    Java Core, Level 8, Lesson 8
    Resolved
    i need a if/else in constructor but super(name) has to be the first line in constructor.public class TxtInputStream extends FileInputStream { private final String fileName; public TxtInputStream(String fileName) throws IOException, UnsupportedFileNameException { this.fileName = fileName; if(fileName.substring(fileName.length() -4).equals(".txt"))
    • 07.04.2019
    • 1262views
    • 2comments
    0
  • Vatsal Patel
    Level 15
    Naperville
    Question about the task Longest sequence
    Java Syntax, Level 8, Lesson 6
    Under discussion
    What am I doing wrong?I don't know what to do.
    • 08.04.2019
    • 1282views
    • 3comments
    0
  • Jeet
    Level 2
    Najafgarh
    Question about the task Square of a number
    Java Syntax, Level 1, Lesson 8
    Archived
    Where is the mistake, from my end all conditions are satisfied.Please help me to complete this task.
    • 06.04.2019
    • 1515views
    • 3comments
    0
  • Mike McKenna
    Level 25
    Wilmington
    Under discussion
    Nerd break end of level 1Hi, I am unable to unlock Nerd break @ end of Level 1 ? Thank You Mike
    • 08.04.2019
    • 1196views
    • 1comment
    0
  • mallikarjuna
    Level 3
    Bangalore
    Question about the task Minimum of three numbers
    Java Syntax, Level 2, Lesson 8
    Under discussion
    plz fill this code public class Solution { public static int min(int a, int b, int c) { //write your code here } public static void main(String[] args) throws Exception { System.out.println(min(1, 2, 3)); System.out.println(min(-1, -2, -3)); System.out.println(min(3, 5, 3)
    • 21.08.2018
    • 1187views
    • 4comments
    0
  • qsasdgkl
    Level 17
    San Diego
    Question about the task Positive and negative numbers
    Java Syntax, Level 4, Lesson 4
    Archived
    This compiles in IntellJ but refuses to run on the website, furthermore it claims that the program is not fulfilling requirements, but it does. package com.codegym.task.task04.task0412; /* Positive and negative numbers */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader reader = new BufferedReader(new InputStreamReader(System.i
    • 08.04.2019
    • 1433views
    • 3comments
    0
  • Skylar
    Level 2
    Flint
    Question about the task As simple as 2+2
    Java Syntax, Level 1, Lesson 8
    Resolved
    Not sure how to do thisI don't get how to do this because I dont get how to call a method aka the sum like what do I do here?
    • 10.10.2018
    • 2319views
    • 8comments
    0
  • Sabine Meijran-Prins
    Level 7
    Enschede
    Question about the task Implement the fight method
    Java Syntax, Level 5, Lesson 5
    Under discussion
    Why is a non existing object used as a parameter?I do not understand why in this code: public boolean fight(Cat anotherCat) { //write your code here } public static void main(String[] args) { } ... The object anotherCat is used as a parameter, but this object is not made into the main method?
    • 05.01.2019
    • 1729views
    • 4comments
    0
  • Hankster
    Level 9
    Cleveland
    Question about the task Price of apples
    Java Syntax, Level 4, Lesson 1
    Under discussion
    apple.addPrice() vs. Apple.addPrice?I solved the problem but am puzzling over something. The given code calls the addPrice() method twice, once on apple instance: apple.addPrice(50);, and once on apple2 instance: apple2.addPrice(100);. I am uncertain what exactly is going on here with the dot operator being used to call a static met
    • 12.01.2019
    • 1616views
    • 2comments
    0
  • Bill Wu
    Level 29
    Wellington
    Question about the task Find a substring
    Java Multithreading, Level 2, Lesson 5
    Resolved
    the last requirement not verifiedI tried different ways to define "the word that follows the 4th space", with space or punctuation marks etc. But none can be verified. Has anyone solved this?
    • 05.04.2019
    • 1861views
    • 9comments
    0
  • Sokhibjon
    Level 14
    Tashkent
    Question about the task Min and max in arrays
    Java Syntax, Level 7, Lesson 12
    Under discussion
    Any Hints would be appreciated Thank you!!Can anyone please tell me what am i doing wrong?
    • 28.03.2019
    • 1179views
    • 2comments
    0
  • pat
    Level 2
    Question about the task Kind words for the teacher
    Java Syntax, Level 0, Lesson 4
    Resolved
    Why doesn't it match the task conditions?What ist wrong with my code?
    • 02.04.2019
    • 1293views
    • 2comments
    0
  • Learner
    Level 16
    Question about the task Beer
    Java Core, Level 3, Lesson 2
    Resolved
    Not sure what's wrongPlease help.
    • 27.09.2018
    • 1742views
    • 3comments
    0
  • Aakash potepalli
    Level 22
    Bangalore
    Question about the task Hey, are you alive?
    Java Core, Level 3, Lesson 2
    Under discussion
    can anyone tell me where i am wrong package com.codegym.task.task13.task1308; /* Hey, are you alive? */ public class Solution { public static void main(String[] args) throws Exception { interface Person { public void isAlive() { // return true; }
    • 01.04.2019
    • 1599views
    • 5comments
    0
  • Kotzebue
    Level 6
    Minsk
    Question about the task Minimum of three numbers
    Java Syntax, Level 2, Lesson 8
    Resolved
    ERROR: The min method must return the minimum of the numbers a, b, and c.Hi evrybody. Can anyone help me, please? Here is my solution and it really works (on the site and in IDEA with different data), but it doesn't pass verification. public class Solution { public static int min(int a, int b, int c) { int minimum = 0; if ((a < b
    • 05.04.2019
    • 1596views
    • 2comments
    0
  • Vani
    Level 1
    Delhi
    Under discussion
    The program should return a value of 20 and I am getting the required output as well. But when I used the "Code Analysis", it says that a javadoc comment is missing. Can you please help me in this? Thanks in advance!package com.codegym.task.task01.task0137; /* * *Only 20 will do. */ public class Solution { public static int a = 1; public static int b = 3; public static int c = 9; public static int d = 27; public static void main(String[] args) { int result = + a + b - c + d;
    • 03.04.2019
    • 1138views
    • 3comments
    0
  • hemant
    Level 8
    prayagraj
    Question about the task Multiplication table
    Java Syntax, Level 3, Lesson 6
    Under discussion
    What does system.out.println(""); in the last line meanWhat does system.out.println(""); in the last line mean
    • 05.04.2019
    • 1560views
    • 1comment
    0
  • Sachin Sharma
    Level 2
    Pune
    Question about the task I think being a programmer is cool
    Java Syntax, Level 0, Lesson 3
    Resolved
    The task passed testing! Your solution to the task was better than 19% of other students. Can someone explain why only 19%? Thanks in advance!The task passed testing! Your solution to the task was better than 19% of other students. Can someone explain why only 19%? Thanks in advance!
    • 31.03.2019
    • 1469views
    • 2comments
    0
  • Texas Pete
    Level 7
    Bucharest
    Question about the task Describing numbers
    Java Syntax, Level 4, Lesson 7
    Archived
    Failing last conditionI can see the code is failing when entering a zero but can't get my statements the correct way to make it verify, can anyone point me in the right direction with this. Thanks
    • 04.04.2019
    • 1327views
    • 2comments
    0
  • Dan
    Level 2
    Tauranga
    Question about the task Calculate the circumference of a circle
    Java Syntax, Level 2, Lesson 2
    Resolved
    Help please, i've hit a wall I don't know what i'm doing wrong, but I feel like it should be obvious at this point, I've tried several different ways of doing it and I've hit a brick wall
    • 02.04.2019
    • 1855views
    • 5comments
    0
  • Jeff Jeffy
    Level 15
    Irvine
    Question about the task Creating cats
    Java Syntax, Level 5, Lesson 9
    Resolved
    ConfusedIts so bad I cant attach it Error code: constructor Cat(java.lang.String,int) is already defined in class com.codegym.task.task05.task0517.Cat: Cat.java, line: 27, column: 12 Code: package com.codegym.task.task05.task0517; /* Creating cats */ public class Cat { //write your code here
    • 30.03.2019
    • 1809views
    • 4comments
    0
  • Anonymous #10428383
    Level 12
    Seattle
    Question about the task How to avoid Copy+Paste
    Java Multithreading, Level 4, Lesson 6
    Under discussion
    Running encapsuletd class in intellij how to do it?E.g. I have one main class that's only calls another class method. That other class has no main method but the executed code. How can I do that in intellij? I can do it using notepad, but in intellij its compile the entire directory where my tasks are, but I just want to run that two specific cl
    • 03.04.2019
    • 1923views
    • 4comments
    0
  • thithin k v
    Level 14
    Bangalore
    Question about the task Cats in the Universe
    Java Syntax, Level 4, Lesson 2
    Under discussion
    how does the programme workspackage com.codegym.task.task04.task0407; /* Cats in the Universe */ public class Solution { public static void main(String[] args) { Cat cat1 = new Cat(); Cat.count = cat1.count; //write your code here Cat cat2 = new Cat(); Cat.count = cat2.count;
    • 04.04.2019
    • 1433views
    • 1comment
    0
  • Emil Olbinado
    Level 6
    Manila
    Question about the task Product of 10 numbers
    Java Syntax, Level 3, Lesson 4
    Under discussion
    Getting this error in code analysis "Missing a Javadoc comment"I have added several comments to test but issue persist. Although not an actual error, I want to understand what actually is this, why it happened and how to resolve. TIA! Missing a Javadoc comment.: Solution.java, line: 13, column: 5
    • 03.04.2019
    • 4009views
    • 7comments
    0
  • Ovo Leslie
    Level 26
    Lagos
    Question about the task Arithmetic mean
    Java Syntax, Level 5, Lesson 5
    Under discussion
    Help show me whats wrong!Please whats wrong with this code. It's passing all the conditions except the last one :(
    • 27.02.2019
    • 1471views
    • 4comments
    0
  • Clayton
    Level 13
    Bedminster
    Question about the task Arithmetic mean
    Java Syntax, Level 5, Lesson 5
    Under discussion
    Not compiling public static void main(String args[]) throws NumberFormatException, IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int sum = 0; int counter = 0; while(true) { int input = Integer.parseInt(reader.readLine()); if(input == -1) break; sum
    • 03.04.2019
    • 1341views
    • 5comments
    0
  • 1
  • ...
  • 333
  • 334
  • 335
  • 336
  • 337
  • ...
  • 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