CodeGym
Promotion
CodeGym University
Java FullStack
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
  • Mohamad
    Level 4
    Question about the task Task with percentages
    Java Syntax, Level 3, Lesson 3
    Under discussion
    Please someone help me When i run anything in the task he wouldn't run i don't know why iv'e tried to reset hem but doesn't work than iv'e tried to log out and log in again but he don't want to run..... he give me (Error An error occurred: undefined). Please help me...........
    • 11/14/18
    • 1544views
    • 2comments
    0
  • M suleman
    Level 20
    Lahore
    Question about the task Adapting multiple interfaces
    Java Core, Level 9, Lesson 3
    Under discussion
    plz help...padded with zero error? public String getPhoneNumber(){ //Integer.toString(int) String.format("%05d", yournumber); return String.format("%010",Integer.toString(this.data.getCountryPhoneCode())+Integer.toString(this.data.getPhoneNumber())); }
    • 11/14/18
    • 2341views
    • 3comments
    0
  • Kabeer Rajoria
    Level 5
    Gwalior
    Question about the task Positive number
    Java Syntax, Level 4, Lesson 7
    Under discussion
    whats wrong?note that 0 is not a positive or negative number
    • 10/30/18
    • 2157views
    • 3comments
    0
  • sathya
    Level 10
    Cedar Park
    Question about the task 2 + 3 = 5
    Java Syntax, Level 0, Lesson 8
    Under discussion
    Rejecting my answer - Not sure why (changed it)/* 2 + 3 = 5 */ public class Solution { public static void main(String[] args) { int a = 3, b = 2; // System.out.print("two"); System.out.print(b); System.out.print(" plus "); // System.out.print(" minus "); System.out.print(a); // System
    • 11/14/18
    • 1551views
    • 1comment
    0
  • KryptoBlack
    Level 7
    Mumbai
    Question about the task Longest string
    Java Syntax, Level 7, Lesson 6
    Archived
    The output is right according to the condition but it still doesn't satisfy it.In the first for-loop, then initializes and finds the longest string and puts it at index 0. The second for-loop checks for any other smaller strings in the list and removes it then displays. The output is right according to the condition but it still doesn't satisfy it.
    • 10/28/18
    • 1894views
    • 3comments
    0
  • ozayr ahmed
    Level 11
    Paterson
    Question about the task Kind Emma and the summer holidays
    Java Syntax, Level 8, Lesson 8
    Resolved
    Getting java.util.ConcurrentModificationException as errorI've tried many things and CodeGym doesn't explain how to do this.
    • 11/13/18
    • 2352views
    • 4comments
    0
  • sathya
    Level 10
    Cedar Park
    Question about the task 2 + 3 = 5
    Java Syntax, Level 0, Lesson 8
    Under discussion
    Why is it rejecting my answerpackage com.codegym.task.task01.task0108; /* 2 + 3 = 5 */ public class Solution { public static void main(String[] args) { int a = 3, b = 2; // System.out.print("two"); System.out.print(b); System.out.print(" plus "); // System.out.print(" minus ");
    • 11/14/18
    • 1820views
    • 1comment
    0
  • Gowthami
    Level 6
    Hyderabad
    Question about the task Implement the print method
    Java Syntax, Level 2, Lesson 1
    Under discussion
    The main method should call the Solution class's print method exactly twice. ?? Is this condition satisfied if write System.out.println(s); four times in print method ?I think there is some disconnect with 4th requirement by printing just s in print method , can someone please clarify this?
    • 11/13/18
    • 1696views
    • 3comments
    0
  • Rad
    Level 8
    Maidstone
    Question about the task Cat code won't compile
    Java Syntax, Level 7, Lesson 12
    Under discussion
    i need helpprogram is working properly but not satisfying all the conditions
    • 11/13/18
    • 1859views
    • 4comments
    0
  • Harika Yantrapragada
    Level 7
    Hyderabad
    Question about the task Implement the fight method
    Java Syntax, Level 5, Lesson 5
    Resolved
    can you help me with this code logic
    • 11/12/18
    • 1984views
    • 1comment
    0
  • Rad
    Level 8
    Maidstone
    Question about the task Playing Javarella
    Java Syntax, Level 7, Lesson 9
    Under discussion
    i need helpi can't rectify my problem give me solution
    • 11/12/18
    • 1318views
    • 2comments
    0
  • Aswini
    Level 4
    Chennai
    Question about the task Square of a number
    Java Syntax, Level 1, Lesson 8
    Archived
    Help me to solve thisSquare of a number Level 1, Lesson 8 public class Solution { public static void main(String[] args) { //write your code here int a = 5; int result = sqr(5); System.out.println (sqr(int a)); } public static int sqr(int a) { return a * a; } }
    • 11/12/18
    • 1624views
    • 3comments
    0
  • Joyonta Saha
    Level 31
    Question about the task R or L
    Java Syntax, Level 7, Lesson 9
    Resolved
    Code is giving correct result however not passing the verification. Need Help!Code is giving correct result however not passing the verification. Need Help!
    • 8/21/18
    • 2451views
    • 2comments
    2
  • M suleman
    Level 20
    Lahore
    Question about the task Horse racing
    Java Core, Level 6, Lesson 5
    Archived
    plz helppublic static int calculateHorsesFinished(List horses) throws InterruptedException { int finishedCount = 0; //write your code here while(true){ if(isFinished()){ finishedCount++;} else if(!isFinished()){ System.out.println("Waiti
    • 11/9/18
    • 1655views
    • 2comments
    0
  • Mightybjorn
    Level 3
    Montreal
    Question about the task Minimum of three numbers
    Java Syntax, Level 2, Lesson 8
    Resolved
    Not sure why code is failing verificationCan't figure out where my code is failing. Can anyone give me a hint? The complier is outputting: variable ans might not have been initialized: Solution.java, line: 20, column: 16 com/codegym/task/task02/task0216/Solution.java:20: error: variable ans might not have been initialized retur
    • 11/5/18
    • 1782views
    • 4comments
    0
  • Amar Kumar
    Level 2
    Bhilwara
    Question about the task I think being a programmer is cool
    Java Syntax, Level 0, Lesson 3
    Under discussion
    How to print it in 34 character?import java.util.*; class abc { public static void main(String [] args) { System.out.print("I think being a programmer is cool"); } }
    • 11/9/18
    • 2075views
    • 2comments
    0
  • rishabh
    Level 2
    Noida
    Question about the task Implement the print method
    Java Syntax, Level 2, Lesson 1
    Under discussion
    The print method should display the string 4 times. Each time, on a new line. In the print method, display the passed string 4 times. Each time, on a new line.
    • 10/18/18
    • 2381views
    • 12comments
    0
  • Jacqueline Lim
    Level 9
    Makati
    Question about the task Going national
    Java Syntax, Level 8, Lesson 11
    Archived
    ???What's wrong?
    • 11/8/18
    • 1633views
    • 3comments
    0
  • Vishwambhar Awagan
    Level 8
    Pune
    Question about the task Console-based piggy bank
    Java Syntax, Level 5, Lesson 12
    Resolved
    I didnt get why it is not working..
    • 10/8/18
    • 2161views
    • 2comments
    0
  • shobi khan
    Level 18
    Lalian
    Question about the task Duplicating words
    Java Syntax, Level 7, Lesson 9
    Under discussion
    Plz help mehow can i verify the third condition
    • 11/9/18
    • 1994views
    • 2comments
    0
  • SAYAN SAMANTA
    Level 10
    Bangalore
    Question about the task Distance between two points
    Java Syntax, Level 6, Lesson 8
    Under discussion
    how to resolve this? package com.codegym.task.task06.task0609; /* Distance between two points */ public class Util { public static double getDistance(int x1, int y1, int x2, int y2) { int a = (x2 - x1); int b = (y2 - y1); int p = a*a + b*b; double s = Math.sqrt(double p);
    • 8/21/18
    • 2057views
    • 3comments
    0
  • Harika Yantrapragada
    Level 7
    Hyderabad
    Question about the task Positive number
    Java Syntax, Level 4, Lesson 7
    Resolved
    may I know what's wrong with this codeIt's giving correct output while running in eclipse
    • 11/8/18
    • 2086views
    • 5comments
    0
  • Nirake_
    Level 8
    Mumbai
    Question about the task 2 + 3 = 5
    Java Syntax, Level 0, Lesson 8
    Under discussion
    "how do I rectify it ..I am not able to do it.
    • 11/8/18
    • 1473views
    • 1comment
    0
  • Sharmila
    Level 1
    Question about the task 2 + 3 = 5
    Java Syntax, Level 0, Lesson 8
    Under discussion
    i want to complete the task.. please help me/* 2 + 3 = 5 */ public class Solution { public static void main(String[] args) { /* on screen to display the following line */ int a = 2; int b = 3; int c = a+b; String s1 = " plus "; String s2 = " is equal to "; // System.out.print("2 plus 3 is equal to to 5");
    • 11/8/18
    • 1805views
    • 1comment
    0
  • Aswini
    Level 4
    Chennai
    Question about the task My young friend
    Java Syntax, Level 0, Lesson 4
    Under discussion
    Try itpublic class Solution { public static void main(String[] args) { //write your code here int a= 3126; int b= a-8; System.out.println("my friend's birth year" + b); } }
    • 11/8/18
    • 2453views
    • 1comment
    0
  • Akash Sharma
    Level 5
    Delhi
    Question about the task 18+
    Java Syntax, Level 4, Lesson 6
    Under discussion
    what is the errorpackage com.codegym.task.task04.task0422; /* 18+ */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader buffer = new BufferedReader(new InputStreamReader (System.in)); String a = buffer.readLine(); String
    • 10/29/18
    • 1779views
    • 5comments
    0
  • hidden #10362262
    Level 9
    Question about the task Maximum of four numbers
    Java Syntax, Level 4, Lesson 6
    Under discussion
    I passed the task, but it won't run in IntelliJ What do I need to do to fix the error message at the bottom in IntelliJ? It says: Error:Cannot run program "C:\Program Files\Java\jdk-10.0.1\bin\java.exe" (in directory "C:\Users\Thomas Yates\.IdeaIC2018.1\system\compile-server"): CreateProcess error=2, The system cannot find the file specified
    • 11/8/18
    • 1792views
    • 1comment
    0
  • Fadi AlSaidi
    Level 13
    Carrollton
    Question about the task Crossing the road blindly
    Java Syntax, Level 4, Lesson 4
    Resolved
    correct output, but can't verifyI tried all kind of real numbers and the program works correctly.. can any one spot an issue?
    • 11/7/18
    • 1814views
    • 2comments
    0
  • joe
    Level 3
    Kigali
    Question about the task Pay raise
    Java Syntax, Level 2, Lesson 2
    Under discussion
    Can't resolve typoWhat's wrong with this picture?
    • 11/7/18
    • 1815views
    • 3comments
    0
  • Abhilash Ravichandran
    Level 10
    Kigali
    Question about the task Let's make the code do something useful!
    Java Syntax, Level 9, Lesson 11
    Under discussion
    Compilation errorcannot find symbol symbol: variable fileInputStream location: class com.codegym.task.task09.task0929.Solution: Solution.java, line: 32, column: 16 The line that initializes fileInputStream, line 17 is not being executed.
    • 11/7/18
    • 1931views
    • 1comment
    0
  • 1
  • ...
  • 360
  • 361
  • 362
  • 363
  • 364
  • ...
  • 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