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
All quests
All levels
Any status
Questions about tasks
Hot
LuisRC
Level 39
Gijón
Question about the task
Fix four mistakes
Java Core
,
Level 4
,
Lesson 8
Under discussion
Casting issues
Hi there, On this task all castings are giving an error so I cannot verity it. I mean: - new Double(xxxx) - new Float(xxx) the debugger says "Double(double)' is deprecated and marked for removal " and so for Float. This is my piece of code: private static void initList(List list) { list.add
11.02.2022
570
views
6
comments
0
Stanislav Mayer
Level 15
Question about the task
Identical words in a list
Java Syntax
,
Level 10
,
Lesson 11
Under discussion
Correct results but 4th and 5th conditions not met (Verificator bug?)
Hi, would you please check my code and advise why the last two conditions are not met? To me, it seems like a bug (?) Thank you.
11.02.2022
672
views
1
comment
1
Jcode
Level 27
Question about the task
The method returns a result — the depth of its stack trace
Java Syntax
,
Level 15
,
Lesson 2
Under discussion
Same code but different output - reason?
I run the code on VSCode and IntelliJ and I get the following output: getStackTrace getStackTraceDepth main Stack Trace Depth:3 When I run it on CodeGym I get: getStackTrace getStackTraceDepth main invoke0 invoke invoke invoke callMainMethod execute execute main main Stack Trace Depth:12 Any ideas
10.02.2022
700
views
4
comments
0
Anthony Chalk
Level 30
London
Question about the task
No idiots
Java Multithreading
,
Level 5
,
Lesson 5
Resolved
Please help
My code does display the message
02.03.2021
1024
views
8
comments
0
Angel Stefan
Level 23
Sibiu
Question about the task
Rounding numbers
Java Core
,
Level 8
,
Lesson 11
Resolved
Any hint!?
More and more difficult!
10.02.2022
605
views
5
comments
0
Angel Stefan
Level 23
Sibiu
Question about the task
CRUD 2
Java Core
,
Level 7
,
Lesson 10
Resolved
Why i < args.lenght; and not args.lenght-1; ???
For the conditions -d and -i i use a for(int i = 1; i < args.lenght-1; i++) and the task didn't pass. I changed in i < args.lenght; just like that... and pass, but i don't understand why? If args.lenght = 10 and args[0] = "-d", from 1 to 9 I have the rest of args array. If i loop until i = 10
09.02.2022
488
views
2
comments
0
Anonymous #10798360
Level 8
Woking
Question about the task
Minimum of two numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
variable c might not have been initialized.
It says variable c might not have been initialized. I've declared the c variable as an int. Don't know what wrong. Please help
08.02.2022
502
views
2
comments
0
Alexandre Desbois
Level 10
Chamarandes-Choignes
Question about the task
Longest sequence
Java Syntax
,
Level 8
,
Lesson 6
Resolved
Why my code doesn't work for numbers higher than 127 ?
Hi, I don't understand why my code doesn't work. I guess it's because I used Integer (which we have to use) but I don't know how to bypass it. I tried to change Integer by Long, but it didn't work. Thanks!
09.02.2022
422
views
2
comments
0
Angel Stefan
Level 23
Sibiu
Question about the task
CRUD
Java Core
,
Level 7
,
Lesson 10
Resolved
I don't understand this task!
What we need to do? If i understand corect we need to work with main(String [] args)... If somebody can give me a hint, or a link, or something... Tk you! I'm in a dark here! :(
07.02.2022
912
views
11
comments
0
Anonymous #10887977
Level 14
Chicago
Question about the task
Cat carnage (3)
Java Syntax
,
Level 10
,
Lesson 2
Under discussion
Not sure what I'm missing...
I have got this to pass all qualifications except the third, which is an arbitrary "implement fight method based on weight, age, and strength", which I have done, comparing each stat separately. And this code seems to work. Pardon all my //comments. Without any additional cues as to what I am doi
08.02.2022
563
views
2
comments
0
Ian De Bie
Level 28
Austin
Question about the task
Minesweeper (Part 16/16)
Games
,
Level 0
,
Lesson 0
Under discussion
Published Version - Score not showing up
Why doesn't the score show on the published version of the game on the website? Is that by design, or is there something I can do to change that so the score will show up like it does in my IDE? This was my first game published so not sure what code gets modified after publishing. Thanks.
26.06.2020
769
views
7
comments
0
Raisa Toscano
Level 22
Tepic
Question about the task
Default values
Java Core
,
Level 5
,
Lesson 9
Resolved
how could i call them if they are no static?
public class Solution { public int intVar; public double doubleVar; public Double DoubleVar; public boolean booleanVar; public Object ObjectVar; public Exception ExceptionVar; public String StringVar; public static void main(String[] args) { Sys
28.01.2019
2214
views
8
comments
0
Jcode
Level 27
Question about the task
Measure how long it takes to perform 10,000 insertions on each list.
Java Syntax
,
Level 14
,
Lesson 5
Under discussion
Is CodeGym making ArrayLists look bad:-)
Anyone noticed how LinkedList beats ArrayList in the CodeGym insertion test. Yet the general consensus is ALWAYS use ArrayList's - even the author (Joshua Bloch) of Java’s Collections framework said 'Does anyone actually use LinkedList? I wrote it, and I never use it.' Then I noticed list.add(0,
03.02.2022
765
views
9
comments
0
Gellert Varga
Level 23
Szekesfehervar
Resolved
Question about System.exit() and System.nanoTime() and JVM instances
Description of these two methods in the Oracle API: System.exit() : "Terminates the currently running Java Virtual Machine." System.nanoTime() : "The value returned represents nanoseconds since some fixed but arbitrary origin time. The same origin is used by all invocations of this method in a
30.01.2022
730
views
7
comments
0
qsasdgkl
Level 17
San Diego
Question about the task
Make a family
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Output is fine in IntellJ but still not passing last requirement.
package com.codegym.task.task08.task0824; import java.lang.reflect.Array; import java.util.ArrayList; public class Solution { public static void main(String[] args) { ArrayList c1 = new ArrayList(); ArrayList c2 = new ArrayList(); ArrayList c3 = new ArrayList();
29.04.2019
1747
views
2
comments
0
Marek Pasierbek
Level 9
Poznań
Question about the task
MovieFactory
Java Core
,
Level 4
,
Lesson 8
Under discussion
Last 3 conditions are not OK
Who can help? Something wrong is with loop "while" ?
27.08.2020
585
views
4
comments
0
Nazar Kani Ahamed Nainar
Level 11
Charlotte
New
Priority Queue
I am going through some interview programming assignments regarding Java. Can some one please help me in this regard? public interface PriorityQueue { boolean isEmpty(); int size(); Key min(); void resize(int capacity); // resize the underlying array to have the given capacity
02.02.2022
327
views
0
comments
0
Ajani
Level 16
Jacksonville
Question about the task
Functionality is not enough!
Java Syntax
,
Level 10
,
Lesson 11
Under discussion
My code does what it says it does not and will not pass me.
If an empty string is entered after a number, then that number should also be displayed (it must not be lost). This is what it claims I do not do. however that is not the case try yourself and you'll see you will still get a map pairing for the number even should you enter a blank after in the in
02.02.2022
332
views
1
comment
0
Tayyab Mubeen
Level 16
Lahore
Question about the task
Use the fewest number of static modifiers
Java Syntax
,
Level 10
,
Lesson 11
Resolved
i think i need three but am using four static modifiers please help me clerify this...!!!
public class Solution { public int A = 5; public static int B = 5; public static int C = 5; public static int D = 5; public static void main(String[] args) { Solution solution = new Solution(); solution.A = 5; solution.B = 5 * B; solution.C = 5 *
28.10.2018
1547
views
4
comments
0
Angel Stefan
Level 23
Sibiu
Question about the task
Transactionality
Java Core
,
Level 7
,
Lesson 10
Resolved
It work's but not pass
Any hint? Tk you!
01.02.2022
575
views
2
comments
0
Sajjad Ahmed
Level 10
Bangalore
Under discussion
Code Gym server down ?
Error while checking server availability. java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired" at java.base/sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2168) at java.base/sun.net.www.protocol.https.AbstractDele
31.01.2022
389
views
1
comment
0
Angel Stefan
Level 23
Sibiu
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Resolved
I realy don t understand how this solution work
I don t see why removeFirstNameDuplicates(Map map) works. Pls, i realy need an explanation! Tk you! public static void removeFirstNameDuplicates(Map map) { map = {"ab"-"ab", "ac"-"ac", "ad"-"ab", "ae"-"ab"...} // let say ArrayList list = new ArrayList<>(); // empty array
25.11.2021
666
views
4
comments
0
Jomar Tayactac
Level 5
Winnipeg
Question about the task
Prices 2
Java Core
,
Level 8
,
Lesson 11
Under discussion
Any help would be appreciated.
I can't seem to figure out what's causing my code to not verify the 3rd and 4th requirements. Please take a look at my code and recommend what I could try. Thanks in advance.
31.01.2022
446
views
5
comments
0
Angeget
Level 22
Potsdam
Question about the task
Splitting a file
Java Core
,
Level 8
,
Lesson 5
Resolved
Please i need some help. I tried it over and over again unfortunately i could not figure out.
Please i need some help. I tried it over and over again unfortunately i could not figure out.
19.02.2019
2078
views
24
comments
0
hidden #10920327
Level 24
Question about the task
Triangular array
Java Syntax
,
Level 6
,
Lesson 6
Resolved
Good result, still no pass
Im getting the result, but still can't pass the verification. Where's the mistake?
31.01.2022
908
views
2
comments
0
Angel Stefan
Level 23
Sibiu
Question about the task
Clew
Java Core
,
Level 6
,
Lesson 13
Resolved
I have no idea how to pass with thread4
I don't know how a thread can implement a random interface. I can't do it with an X class obj. Any help will be appreciete, tk you!
30.01.2022
657
views
4
comments
0
Henrique
Level 41
São Paulo
Question about the task
User, loser, coder and programmer
Java Core
,
Level 4
,
Lesson 8
Resolved
Output is correct, but failed to pass the last 4 requirements
Just don't understand why. Could somebody help?
04.06.2020
850
views
7
comments
0
Jcode
Level 27
Question about the task
Checking the order
Java Syntax
,
Level 13
,
Lesson 5
Under discussion
A question
A condition of the task is:- If the list is not ordered by increasing string length, then display the index of the first element that violates this order. The list is:- grandfather grandmother father mother son daughter cats dog program car My code displayed index 1 (Grandmother) as it is the first
30.01.2022
460
views
4
comments
0
Vitalina
Level 20
Question about the task
Comparable
Java Core
,
Level 7
,
Lesson 10
Resolved
The problem with compareTo method
Hi! I have a problem with compareTo method. "Be sure that compareTo method returns different values for different objects". I've already checked in main method it - and I see that compareTo method returns different values for different objects. So what does codegym wants from me? Thanks in advance!
07.09.2021
995
views
9
comments
0
Lawson
Level 29
Lagos
Question about the task
Refactoring, nested classes
Java Multithreading
,
Level 3
,
Lesson 6
Resolved
Pls help.. I don't understand this
help
20.09.2020
409
views
1
comment
0
Show more
1
...
47
48
49
50
51
...
371
Please enable JavaScript to continue using this application.