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
Ask a question
Java 25
All quests
All levels
Any status
Questions about tasks
Hot
Daniel Whyte
Level 17
Question about the task
Cat and statics
Java Syntax
,
Level 6
,
Lesson 11
Under discussion
Constructors
When an object of a class is made does it always automatically call the constructor?
1/28/21
683
views
1
comment
0
MoJo
Level 23
Cairns
Resolved
what does HashCode() do?
So in given code (find mistakes etc.) there is a function overwritten that's called "HashCode". What is this used for? example public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (assets != null ? assets.hashCode() : 0);
1/27/21
492
views
1
comment
0
Liliane Top
Level 24
Amsterdam
Question about the task
Reading and writing to a file: Human
Java Core
,
Level 10
,
Lesson 2
Resolved
A lot of confusion
I just copied some code from others and from the lesson 1 but I do not understand it. Maybe someone can revert me to another source to understand the concepts behind this task? For now a couple of questions 1) Why do we create a variable to check for instance if it has a name. What does it add? Woul
1/14/21
704
views
5
comments
0
Deborah Wenrich
Level 7
Pembroke Pines
Question about the task
Flip the array
Java Syntax
,
Level 7
,
Lesson 4
Under discussion
What lovely thing Am I missing? It is failing to pass on the last criteria.
package com.codegym.task.task07.task0704; import java.io.BufferedReader; import java.io.InputStreamReader; /* Flip the array */ public class Solution { public static void main(String[] args) throws Exception { //write your code here BufferedReader reader = new BufferedReader
9/26/20
565
views
3
comments
0
Daniel Whyte
Level 17
Question about the task
Feng Shui and statics
Java Syntax
,
Level 6
,
Lesson 11
Under discussion
Static int A
I think I understand. Am I right in saying that you have to declare static for int A because it is an instance variable while it is just declared in the class and an instance variable can't be used as an object?
1/27/21
693
views
1
comment
0
Daniel Whyte
Level 17
Question about the task
Arithmetic mean
Java Syntax
,
Level 5
,
Lesson 5
Under discussion
Output
My output seems to work but the code doesn't pass testing. What's wrong with it?
1/28/21
564
views
2
comments
0
Liliane Top
Level 24
Amsterdam
Question about the task
Files and exceptions
Java Core
,
Level 8
,
Lesson 11
Resolved
Confusion I do not get the difference between try-catch and try-with-resources
I understand that try-with resources automatically closes the streams but what if you wantt to use try with catch block. I'm clueless as why this codes is wrong and the validator is even more confusing. package com.codegym.task.task18.task1824; /* Files and exceptions */ import java.io.*; pub
1/8/21
609
views
5
comments
1
Andrei
Level 41
Question about the task
Rounding numbers
Java Core
,
Level 8
,
Lesson 11
Resolved
I believe it's correct, but apparently not even the reading of the numbers is correct. Assistance, please!
I have gone through multiple times and it seems fine to me. The only thing that MAYBE is not ok is that I add a space even at the end of the new file where I write the rounded numbers. But it doesn't say anywhere that there shouldn't be a space after the last number. Anyway, what is the problem? I
1/19/21
756
views
7
comments
0
I.A
Level 7
unknown city
Question about the task
Maximum in an array
Java Syntax
,
Level 7
,
Lesson 4
Under discussion
what to do in case of negative number in data.how would it check negative.?
what to do in case of package com.codegym.task.task07.task0701; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* Maximum in an array */ public class Solution { public static void main(String[] args) throws Exception { int[] array = in
3/30/20
1314
views
4
comments
0
Stephanie
Level 4
Rochester
Question about the task
Minimum of four numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
Problem with test case 3 - min(-20, -10, -30, -40)
My code is almost complete, however I am having an issue with the above stated test case. How can I fix it? package com.codegym.task.task02.task0217;
1/27/21
504
views
2
comments
0
Abdelrahman
Level 5
Amman
Question about the task
18+
Java Syntax
,
Level 4
,
Lesson 6
Resolved
Help
I don't understand why the third task isn't met I did try to do System.out.println(name); System.out.println(age); but the 4th task also became unchecked but I did what it asked of me.
1/24/21
638
views
2
comments
0
Isa Musa
Level 3
Kano
Question about the task
Implement the print method
Java Syntax
,
Level 2
,
Lesson 1
Resolved
Print method
What is the error in this code please? Whenever I try to run it it's used to show me 👉The print method should display the strings for times. Each time in a new line. Shade me more light on this please.
1/4/21
1158
views
1
comment
0
Maryem Vickers
Level 7
HT...
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Resolved
Hello-- I need more help on this please!
I have two things wrong and I cannot figure this out. I have been here for ages trying to work it out, but in vain. Can you please help?! I have two parts wrong! Thank you for your help!
1/22/21
608
views
2
comments
2
Ruubgaming
Level 2
Almere Stad
Under discussion
My language changed
So I just got to level 2 but for some reason the text is english but everything else is dutch (what I want). My interface language is set tu dutch.
1/26/21
523
views
2
comments
0
J H U X
Level 7
Alkmaar
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Resolved
I am unable to solve this algorithms task...
The code works. It prints out the correct answer, but clearly I am not doing it the right way or I have an error somewhere. I am taking N from the keyboard and then loop N times. In this loop I set the highest nextN to int maximum. After loops are finished, I print out maximum. If N <= 0 I break
1/24/21
870
views
8
comments
0
Daniel Whyte
Level 17
Question about the task
Even and odd digits
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
Won't read
What's wrong with my code. It won't seem to read.
1/25/21
809
views
3
comments
0
Josephine
Level 2
Normal
Question about the task
Externalizable Person
Java Core
,
Level 10
,
Lesson 7
Under discussion
what is wrong in the code?second condition not passing.Someone help
what is wrong in the code? Error says The server is unable to properly test your solution. Be sure you have all the classes you need. Be sure that your solution doesn't have any infinite loops.
1/13/21
495
views
2
comments
0
Maxim Raitin
Level 20
Tomsk
Question about the task
HashMap of 10 pairs
Java Syntax
,
Level 8
,
Lesson 3
Under discussion
My code works..
My code works.. but this doesn't compile in Codegym. Btw why what is the difference in line 13 between HashMap map = new HashMap(); and Map map = new HashMap(); ?
1/25/21
651
views
2
comments
0
WhiteColloid
Level 7
San Francisco
Question about the task
Cat and statics
Java Syntax
,
Level 6
,
Lesson 11
Under discussion
when to use "this" and when to use Cat.
When should I use this and when to use Cat. to call the variable in Cat class? public class Solution { public static void main(String[] args) { // Create 10 cats Cat cat1 = new Cat(); Cat cat2 = new Cat(); Cat cat3 = new Cat(); Cat cat4 = new Cat();
1/9/21
764
views
3
comments
0
remote87
Level 18
Sofia
Question about the task
Who's that smarty?
Java Core
,
Level 3
,
Lesson 2
Resolved
I missed something
I am really frustrated and confused with these ineterfaceses... I though that we can use the word extends only for classes inheritance and when using it, we can inherit only one class. But here: interface Boss extends Person, HasManagementPotential { } the interface extends ( inherits ) two ..
1/25/21
618
views
2
comments
0
Marco Negus
Level 9
Under discussion
?????
hi guys anyone know why on the website im at level 3 lesson 3 available but after download e set intelliJ on my task i can just see till level 0 and 1 task ? how can i open all my new available task if i cannot show inside the IDE task? is a subcription problem?
12/21/20
463
views
3
comments
0
Pandurang Patil
Level 3
kolhapur
Under discussion
level 3
I am study Mobil use code gym aap the level 3is not open and ideal c jdk 8 not installing and the not open please help me Sir ??
1/25/21
415
views
0
comments
0
Peerawas
Level 18
Question about the task
Robot wars
Java Core
,
Level 3
,
Lesson 11
Under discussion
I don't understand the logic of this game
The new body part must be added to the logic for the attack and defend methods in the AbstractRobot class.
12/30/18
2049
views
6
comments
0
Daniel Whyte
Level 17
Question about the task
Static methods for cats
Java Syntax
,
Level 6
,
Lesson 8
Under discussion
Cat.catCount
Why can I not use this. catCount on the setter method?
1/25/21
540
views
1
comment
0
myqms
Level 22
Landshut
Question about the task
Inverted words
Java Multithreading
,
Level 2
,
Lesson 9
Under discussion
The output seemes to be corret. But why doesn't it pass ?
The result list must be filled with correct pairs according to the task conditions, but I guess it does. Where is my mistake in thinking. Thank you for your advice, in advance.
1/24/21
769
views
1
comment
0
taehee Im
Level 2
Kuri
Under discussion
Korean language support is not available.
Korean language support is not available from level 2. What happened?
1/25/21
781
views
0
comments
0
Seth Barker
Level 5
Eureka Springs
Question about the task
Rule of the triangle
Java Syntax
,
Level 4
,
Lesson 4
Resolved
Stopping run & not sure what is wrong with code
Couple of things going on. When I'm running the Solution in IntelliJ, nothing is showing up in the build for this task. I have to "stop" the build. Also - I'm not sure what's wrong with the code: package com.codegym.task.task04.task0415; /* Rule of the triangle */ import java.io.*; public
1/23/21
584
views
2
comments
0
zub
Level 41
Milan
Question about the task
MovieFactory
Java Core
,
Level 4
,
Lesson 8
Resolved
Where am I going wrong?
Any help is appreciated.
1/24/21
621
views
2
comments
0
Anitamalina
Level 18
København
Question about the task
Cat counter
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
What am I doing wrong here?
What am I doing wrong here?
10/22/20
690
views
2
comments
0
Jurij Thmsn
Level 29
Flensburg
Question about the task
Working with dates
Java Syntax
,
Level 8
,
Lesson 11
Resolved
passed testing, but wrong output
I passed the test with this code but in the Conditions example it returns "true" for January 1 2000. My code returns "false". I am confused again. Did I solve the task right or not? public class Solution { public static void main(String[] args) throws ParseException { System.out.println
1/23/21
834
views
4
comments
0
Show more
1
...
92
93
94
95
96
...
374
Please enable JavaScript to continue using this application.