CodeGym
Promotion
CodeGym University
Learning
Course
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
All quests Java Syntax Java Core Java Multithreading Java Collections JSP & Servlets Java Syntax Pro Games
All levels Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 Level 9 Level 10 Level 11 Level 12 Level 13 Level 14 Level 15 Level 16 Level 17 Level 18 Level 19 Level 20 Level 21 Level 22 Level 23 Level 24 Level 25 Level 26 Level 27 Level 28
Any status New Discussed Resolved Archived Duplicates
Hot Popular New Old
  • WatWat
    Level 9
    Vancouver
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Archived

    Works when I 'run' it but wont verify. Please help lol

    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int maximum = 0; int n = Integer.parseInt(reader.readLine()); int arr[] = new int [n]; for(int i = 0; i < n - 1; i += 1){ int number = Integer.parseInt(reader.readL
    • 11.10.2018
    • 1411views
    • 2comments
    0
  • WatWat
    Level 9
    Vancouver
    Question about the task Console-based piggy bank
    Java Syntax, Level 5, Lesson 12
    Resolved

    Works in repl.. Why is it not being verified?

    package com.codegym.task.task05.task0529; import java.io.BufferedReader; import java.io.InputStreamReader; /* Console-based piggy bank */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReade
    • 11.10.2018
    • 1416views
    • 4comments
    0
  • I.A
    Level 7
    unknown city
    Under discussion

    why its not correct?

    package com.codegym.task.task02.task0205; /* Pay raise */ public class Solution { public static void main(String[] args) { hackSalary(7000); } public static void hackSalary(int a) { a = a + 1000; System.out.println("Your sa
    • 10.10.2018
    • 820views
    • 1comment
    0
  • Azhar Iqbal
    Level 18
    Multan
    Question about the task Horse racing
    Java Core, Level 6, Lesson 5
    Archived

    Not Clearly understanding the problem can anyone explain it.?

    Advance thanks :)
    • 08.10.2018
    • 965views
    • 2comments
    0
  • PRADYUMNA HEGDE
    Level 2
    SHIVAMOGGA
    Under discussion

    what is the problem with my code?

    public class Solution { public static void main(String[] args) { System.out.println("Two roads diverged in a yellow wood,"); System.out.println("And sorry I could not travel both"); System.out.println("And be one traveler, long I stood"); //write
    • 09.10.2018
    • 735views
    • 1comment
    0
  • Niranjan Soni
    Level 15
    Bangalore
    Question about the task User, loser, coder and programmer
    Java Core, Level 4, Lesson 8
    Under discussion

    Please suggest what's wrong in my code? doWork() method cannot find methods live(), doNothing() and others from Person class.

    package com.codegym.task.task14.task1411; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; /* User, loser, coder and programmer */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new Bu
    • 05.10.2018
    • 1011views
    • 1comment
    0
  • Shipra Nandi
    Level 5
    Chandigarh
    Question about the task Parenthetical brainteaser
    Java Syntax, Level 3, Lesson 4
    Resolved

    tried every possibility but it's not going on!

    package com.codegym.task.task03.task0306; /* Parenthetical brainteaser */ public class Solution { public static void main(String[] args) { System.out.println((2 * 3 + 4) * (5 + 6) * 7); } }
    • 01.10.2018
    • 1274views
    • 1comment
    0
  • Sindhura
    Level 15
    Delhi
    Question about the task Dividing by zero
    Java Syntax, Level 9, Lesson 11
    Resolved

    throwing an error.please help

    package com.codegym.task.task09.task0919; /* Dividing by zero */ public class Solution { public static void main(String[] args) { try{ divideByZero(); } catch(Exception e) { System.out.println(e.printStackTrace()); } } public s
    • 08.10.2018
    • 1134views
    • 4comments
    0
  • MARIO
    Level 4
    Rosario
    Question about the task You can't have too much of a good thing
    Java Syntax, Level 4, Lesson 10
    Archived

    What's wrong with my code?

    When it runs without verification it works correctly.
    • 08.10.2018
    • 1335views
    • 6comments
    0
  • Sindhura
    Level 15
    Delhi
    Question about the task Min and max in arrays
    Java Syntax, Level 7, Lesson 12
    Under discussion

    help me please

    package com.codegym.task.task07.task0721; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* Min and max in arrays Create an array of integers (int[]) with 20 elements. 2. Read 20 integers from the keyboard and add them to the array. 3. Find the maximu
    • 03.10.2018
    • 1181views
    • 10comments
    0
  • gery
    Level 9
    Islamabad
    Question about the task To the top of the list
    Java Syntax, Level 7, Lesson 6
    Resolved

    whats wrong with the logic, unable to add at the begining

    BufferedReader b = new BufferedReader(new InputStreamReader(System.in)); ArrayList l = new ArrayList(); for(int i=0; i<10; i++) { String ss = b.readLine(); //int size; //add an element on index 0 in the list L l.add(0, ss
    • 22.09.2018
    • 1416views
    • 18comments
    0
  • Learner
    Level 16
    Question about the task Factorial
    Java Core, Level 5, Lesson 12
    Under discussion

    Factorial of a negative number

    Factorial by definition is for positive integers. I do not understand what the program requires. Error message: Be sure that the program works correctly if the entered number is less than 0. So, I have already tried 1. converting the negative number into positive and calculating the factorial. Prin
    • 05.10.2018
    • 2773views
    • 5comments
    0
  • Azhar Iqbal
    Level 18
    Multan
    Question about the task Task about algorithms
    Java Syntax, Level 5, Lesson 12
    Archived

    Where the problem is?

    A little hint is required.
    • 05.10.2018
    • 1042views
    • 2comments
    0
  • Bhumi Shiroya
    Level 4
    Pune
    Question about the task Day of the week
    Java Syntax, Level 4, Lesson 4
    Under discussion

    what is error in the code?

    please tell the error
    • 07.10.2018
    • 906views
    • 1comment
    0
  • Arjun Kiruthivasan
    Level 14
    Chennai
    Question about the task Three numbers
    Java Syntax, Level 4, Lesson 6
    Resolved

    how to solve this?

    package com.codegym.task.task04.task0424; /* Three numbers */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { //write your code here boolean check=false; BufferedReader reader = new BufferedReader(new InputStreamRe
    • 12.08.2018
    • 1258views
    • 4comments
    0
  • Sindhura
    Level 15
    Delhi
    Question about the task Stack trace with 10 calls
    Java Syntax, Level 9, Lesson 2
    Resolved

    whats wrong with this?

    package com.codegym.task.task09.task0904; /* Stack trace with 10 calls */ public class Solution { public static void main(String[] args) throws Exception { int stackTraceLength = method1().length - method10().length + 1; method1(); } public static StackTraceElement[]
    • 07.10.2018
    • 1309views
    • 2comments
    0
  • Shahanshah Alam
    Level 9
    Mohali
    Question about the task Checking the order
    Java Syntax, Level 7, Lesson 9
    Resolved

    help please

    its showing correct index but not at correct position
    • 29.09.2018
    • 1373views
    • 17comments
    0
  • Hamza Abbasi
    Level 2
    Jhelum
    Under discussion

    Display the circumference of a circle, which is calculated using the formula: C = 2 * pi * radius. The result is a fractional number (double).

    Display the circumference of a circle, which is calculated using the formula: C = 2 * pi * radius. The result is a fractional number (double).
    • 07.10.2018
    • 841views
    • 1comment
    0
  • Imtiyaz Ali
    Level 7
    Noida
    Question about the task Where does a Person come from?
    Java Syntax, Level 2, Lesson 2
    Under discussion

    Confusion

    1.Person person; person=new Person(); 2. Person person=new Person(); Ain't both 1 & 2 the same ?
    • 07.10.2018
    • 840views
    • 5comments
    0
  • Anonymous #328859
    Level 3
    Karachi
    Question about the task Parenthetical brainteaser
    Java Syntax, Level 3, Lesson 4
    Resolved

    Confussed

    I am given this code public class Solution { public static void main(String[] args) { System.out.println((2 * 3) + 4 * 5 + (6 * 7)); } } and I have to make it 382. Can Someone help me??
    • 22.09.2018
    • 1074views
    • 1comment
    0
  • shahryar
    Level 2
    Mandi Bahauddin
    Question about the task No comments needed
    Java Syntax, Level 0, Lesson 8
    Under discussion

    I don't understand it how I can do it my answer is correct but the last condition is not verifing.which is You need to uncomment the necessary lines and leave the remaining lines unchanged.

    package com.codegym.task.task01.task0107; /* No comments needed */ public class Solution { public static void main(String[] args) { int x = 2; int y = 12; x = x * 3; y = x + y; x = y - x; y = y - x; y = y -4; System.out.println(x);
    • 26.09.2018
    • 1564views
    • 6comments
    0
  • Henrik Krogsholm
    Level 16
    Copenhagen
    Under discussion

    no input possible

    package com.codegym.task.task03.task0318; /* Plan to conquer the world */ 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.in));
    • 06.10.2018
    • 790views
    • 5comments
    0
  • gery
    Level 9
    Islamabad
    Question about the task More Sam-I-Am
    Java Syntax, Level 7, Lesson 9
    Resolved

    how to add string to the end of list

    i did multiple attempts to solve it but i get result which just run but unable to verify public static void main(String[] args) throws Exception { //write your code here ArrayList s = new ArrayList(); s.add("Sam"); s.add("I"); s.add("Am");
    • 22.09.2018
    • 1532views
    • 11comments
    0
  • vajs2017
    Level 2
    Seoul
    Question about the task No comments needed
    Java Syntax, Level 0, Lesson 8
    Resolved

    How to solve this tricky tasks

    Every time I verify this code. The condition says that this is wrong. I need help.
    • 02.10.2018
    • 929views
    • 4comments
    0
  • SP
    Level 1
    Nagpur
    Question about the task No comments needed
    Java Syntax, Level 0, Lesson 8
    Under discussion

    check fault in code

    what are mistakes in code?
    • 01.10.2018
    • 800views
    • 2comments
    0
  • Riya
    Level 8
    Karnal
    Question about the task Red scare
    Java Syntax, Level 3, Lesson 4
    Resolved

    please suggest how to code

    which format to use
    • 05.09.2018
    • 1165views
    • 6comments
    0
  • FASIH
    Level 4
    LAHORE
    Under discussion

    need help in understanding the meaning of this line

    "The Object class's standard toString() method returns a string consisting of the class name and the object's memory address (in hexadecimal form)."
    • 06.10.2018
    • 823views
    • 3comments
    0
  • Srividya
    Level 3
    Bangalore
    Question about the task Square of a number
    Java Syntax, Level 1, Lesson 8
    Archived

    Write a program that displays the square of 5 on the screen.

    Hi, Below is the code I could write for the task (task01.task0127-Square of a number). I have two errors displayed, 1> The main method should display the result of the sqr method. 2> The displayed text must match the task conditions. So, kindly help me with the solution. Thank You.
    • 25.09.2018
    • 1728views
    • 3comments
    0
  • PRADYUMNA HEGDE
    Level 2
    SHIVAMOGGA
    Question about the task Display the square of a number
    Java Syntax, Level 1, Lesson 3
    Under discussion

    I cant able to identify the mistakes. Please help me

    public class Solution { public static int number = 5; public static void main(String[] args) { //write your code here int number = 5; number = (number * number); System.out.print(number); } }
    • 05.10.2018
    • 786views
    • 1comment
    0
  • WatWat
    Level 9
    Vancouver
    Question about the task Minimum of four numbers
    Java Syntax, Level 2, Lesson 8
    Under discussion

    Finished task - but need clarification on something.

    There are 2 methods called min - so how does main know which one to use for the final output? Is it the order they are written? Its confusing that there can be 2 methods of the same name.
    • 02.10.2018
    • 941views
    • 3comments
    0
  • 1
  • ...
  • 336
  • 337
  • 338
  • 339
  • 340
  • ...
  • 346
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Game Projects
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
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 Java developer’s career.
Follow us
Interface language
Programmers Are Made, Not Born © 2022 CodeGym
Download App
  • Google Play
  • Huawei AppGallery
  • App Store
MastercardVisa
Programmers Are Made, Not Born © 2022 CodeGym
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.