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
Ask a question
All quests
All levels
Any status
Questions about tasks
Hot
Justin Smith
Level 41
Greenfield, USA
Question about the task
MVC (part 8)
Java Multithreading
,
Level 4
,
Lesson 14
Resolved
The private modifier on the getAllUsers method is causing a problem
We have to create a private getAllUsers method in the MainModel class (Step 6). But then we have to also declare this method in the Model interface (Step 8). How can that be? The interface methods cannot be private, and a method implemented from an interface cannot have a different access modifier.
16.01.2022
390
views
3
comments
0
dean
Level 8
Deutschland
Question about the task
The Three "Muscateers"
Java Syntax
,
Level 5
,
Lesson 5
Under discussion
Why there are 2 classes in this code?
Hey a questions about this challenge: Why there are 2 classes in this challenge? class Solution & class Cat .. I thought there can/should be only 1 class per file or? package com.codegym.task.task05.task0504; /* The Three "Muscateers" */ public class Solution { public static void mai
23.04.2019
1532
views
11
comments
1
Elektra
Level 15
United States of America
Question about the task
Working with dates
Java Syntax
,
Level 8
,
Lesson 11
Resolved
What's wrong?
The code is working. It runs and generates the required answer. According to the example they provided they want the first day of the year to be counted, right? I tried a million different dates and my answer is correct every time. The answer is correct, the logic is correct and the math is correct.
15.01.2022
655
views
2
comments
0
Luyi
Level 31
Kosice
Question about the task
Knowledge is power!
Java Multithreading
,
Level 4
,
Lesson 9
Resolved
No able to pass condition regarding sort
Hi, I am not able to pass 3. condition any tips?
05.11.2019
1091
views
4
comments
0
Bill Wu
Level 29
Wellington
Question about the task
Knowledge is power!
Java Multithreading
,
Level 4
,
Lesson 9
Resolved
Not verified
I tested with different cases, and my code seems working fine. My sort logic is: name in alphabetical ascending order, if same, then date in descending order, if same, then profit (last-open) in descending order. I can't figure out where is the problem.
17.04.2019
1855
views
8
comments
0
Gellert Varga
Level 23
Szekesfehervar
Question about the task
Iterating through a file tree
Java Collections
,
Level 1
,
Lesson 2
Archived
?
?
13.01.2022
275
views
6
comments
0
Wyatt Wilhelmi
Level 20
United States of America
Question about the task
Positive number
Java Syntax
,
Level 3
,
Lesson 10
Resolved
I cannot find the problem with my code
I am a novice programmer so I could be making a big mistake and I just do not see it but this code works for all input scenarios that I have tried and yet the verification still marks it as wrong, any hints would be greatly appreciated.
12.01.2022
592
views
4
comments
0
Gytis Laukaitis
Level 18
Marijampole
Question about the task
Snake (Part 8/20)
Games
,
Level 0
,
Lesson 1
Resolved
Need a guidance
Seemed to fulfill all the requirements ,but still not passing. Any eagle eyes ?
02.09.2020
626
views
5
comments
1
Brentachii
Level 13
United States of America
Question about the task
Price of apples
Java Syntax
,
Level 3
,
Lesson 4
Resolved
it appears to work so why is it wrong?
Hi there, I added the sout on line 11 so that when I run it I can see the results of the increases by the passed-in value I would appreciate it if anyone could tell me why is this wrong? thanks
22.11.2021
626
views
4
comments
0
Brentachii
Level 13
United States of America
Question about the task
A cubed cube calculator
Java Syntax
,
Level 7
,
Lesson 3
Resolved
so why doesn't it work the same way as the cube method?
the cube method takes a and turns it into a= a*a*a so why cant the ninthDegree method take a and return it as a = (cube a) * (cube a) * (cube a) ? instead, it's some random statement that is not even explained how or more importantly why it works.
10.01.2022
558
views
4
comments
0
LuisRC
Level 39
Gijón
Question about the task
Octal converter
Java Syntax
,
Level 9
,
Lesson 2
Under discussion
Posible error
Hi there, Is posible that there's a bug in the proposed algorithm for converting an octal number to decimal?
12.01.2022
408
views
6
comments
0
David W
Level 6
United States of America
Question about the task
Positive and negative numbers
Java Syntax
,
Level 3
,
Lesson 7
Under discussion
(n * 2) is not the same as doubling the number?
I'm having trouble completing the third requirement to double the number. I've tried (n * 2) and (n + n) both which double the number when I input a number. But i'm still missing something and failing the task. Any advice? Thank you in advance.
13.01.2022
516
views
1
comment
0
Gellert Varga
Level 23
Szekesfehervar
Resolved
Question about term of "subdirectories"
If we are talking about "users" folder (see attached pic), then what does the term means: "all of its subdirectories" ? A) admin, staff, student; or B) admin, staff, student, jon, steve ?
12.01.2022
252
views
4
comments
0
Gellert Varga
Level 23
Szekesfehervar
Resolved
Externalizable and the inheritance
https://codegym.cc/groups/posts/113-introducing-the-externalizable-interface I don't understand why the the following is said in the lecture (link above) : "Third, when you use inheritance, all descendant classes that inherit some externalizable class must also have default constructors." I assum
08.01.2022
266
views
2
comments
0
LuisRC
Level 39
Gijón
Question about the task
Filling an array
Java Syntax
,
Level 6
,
Lesson 8
Under discussion
About task
Hi there, In don't understand what is actually required in this task. May I have some more detailed information about what it's to be done?
08.01.2022
294
views
4
comments
0
Romain
Level 26
Paris
Question about the task
Iterating through a file tree
Java Collections
,
Level 1
,
Lesson 2
Archived
like everyone else the f**** first condition 🤬
Hi i don't understand the problem...
02.03.2021
646
views
5
comments
0
Gellert Varga
Level 23
Szekesfehervar
Resolved
createTempFile method
Maybe this is an english language problem by me, I dont't know, but I can't interpret good enough the following sentence on this link: https://docs.oracle.com/javase/8/docs/api/index.html?java/io/File.html "public static File createTempFile(String prefix, String suffix) throws IOException Crea
07.01.2022
314
views
2
comments
0
proegg123
Level 16
Question about the task
Array of string lists
Java Syntax
,
Level 10
,
Lesson 11
Under discussion
Generic Array Creation
Why is this "Generic Array Creation" not allowed in the programme? ArrayList<String>[] lists = new ArrayList<String>[5]; When I simplify to ArrayList<String>[] lists = new ArrayList[5]; it compiles. What is the issue with providing the type of the lists (String) and why is it
07.01.2022
330
views
1
comment
0
Pablo Souza
Level 22
Brisbane
Question about the task
Task No. 7 about integer type conversions
Java Syntax
,
Level 10
,
Lesson 4
Under discussion
Choosing to ignore it
In a few years when I'm a senior developer I'll come back here and let you guys know if a question like this really matters if you're not some sort of quantum physicist. Meanwhile I'll choose to ignore trying to understand it and copy and paste someone's answer. I think I could understand it if I du
03.04.2020
1134
views
3
comments
12
Michał
Level 6
Under discussion
Error while signing in using a secret key. Check CodeGymPlugin.properties.
I entered the wrong key when trying to connect InteliiJ and CodeGym. Now I can't correct it. I have uninstalled / installed the plugin again. What can I do? what is a secret key in general? Password? Thank you for your help.
14.09.2020
1227
views
7
comments
0
whoseunassailable
Level 28
India
Question about the task
Adding
Java Syntax
,
Level 4
,
Lesson 10
Under discussion
This is my logic towards the solution of the task and yet when compiled should work properly but instead kept on looping again and again
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String sNum = reader.readLine(); int sum = 0; while (true) { int num = Integer.parseInt(sNum); sum += num; if (num == -1) { break;
05.01.2022
772
views
4
comments
0
Dedcom
Level 19
Lahore
Question about the task
R or L
Java Syntax
,
Level 7
,
Lesson 9
Resolved
help plz
whats wrong with this code?
10.11.2018
1751
views
8
comments
0
Florin1
Level 31
Question about the task
Path update
Java Syntax
,
Level 9
,
Lesson 5
Resolved
Help
Tested with other conditions mentioned elsewhere: "/usr/java/jdk1.8/bin" "/usr/java/jdk/bin" "/usr/java/jdk1.8-beta/bin" and I get the "/usr/java/jdk-13/bin" as asked by the problem What am I missing? (I removed some out of bounds checks from the code just to simplify things on read).
17.12.2021
434
views
3
comments
0
Michael Brimage
Level 19
Washington D.C.
Question about the task
Remove and insert
Java Syntax
,
Level 7
,
Lesson 6
Resolved
Not quite sure where the bug is
I can't tell whats wrong, I think its somewhere between lines 24 and 26
04.03.2020
1144
views
6
comments
0
Angel Stefan
Level 23
Sibiu
Question about the task
Different methods for different types
Java Core
,
Level 5
,
Lesson 12
Resolved
I can't call print(String s)
I don't understand how to put the code to be able to call print(String ) after 4 hours of work, any hint? Tk you!
05.01.2022
290
views
1
comment
0
Dan Ursu
Level 27
Question about the task
Iterating through a file tree
Java Collections
,
Level 1
,
Lesson 2
Archived
I cant pass the 1 condition, help please
package com.codegym.task.task31.task3101; /* Iterating through a file tree */ import java.io.*; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.TreeMap; /*** * Listar todos los ficheros de un directorio y de sus subdirectorios */ public class Solutio
04.01.2022
296
views
2
comments
0
Константин Савченко
Level 25
Ukraine
Question about the task
Binary encoding
Java Syntax
,
Level 10
,
Lesson 8
Under discussion
What is wrong?
I have this in return. return "0000".substring(binaryNumber.length() % 4) + binaryNumber In terminal, I have response: In Unicode, the character C is 67, but in binary it is 01000011 In Unicode, the character o is 111, but in binary it is 01101111 In Unicode, the character d is 100, but in bina
30.12.2021
520
views
3
comments
0
Константин Савченко
Level 25
Ukraine
Question about the task
StringTokenizer
Java Syntax
,
Level 9
,
Lesson 6
Under discussion
Explain me please
I should return String[] from method. I return it, but main method should return {"java", "util", "stream"} . Why it returns [java, util, stream];?
30.12.2021
429
views
4
comments
0
Neha Anjum
Level 6
Hyderabad
Question about the task
Minimum of four numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
I verified my solution....-20 // correct -40 // correct -30 // correct 40 // incorrect !!!....What do I do..? Please Help..!!!
package com.codegym.task.task02.task0217; /* Minimum of four numbers */ public class Solution { public static int min(int a, int b, int c, int d) { min(a,b); if(c<=a && c<=b && c<=d) return c; else return d; } public s
13.09.2018
1985
views
6
comments
0
Gellert Varga
Level 23
Szekesfehervar
Resolved
What is the correct coding of the @Override toString() method?
Suppose we have such a class: public static class Cat { public int age; public int weight; public String name; } In CodeGym tasks, we sometimes get ready toString() methods, usually in this form: @Override public String toString() { return String.fo
02.01.2022
231
views
2
comments
0
Show more
1
...
43
44
45
46
47
...
366
Please enable JavaScript to continue using this application.