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
Ask a question
All quests
All levels
Any status
Questions about tasks
Hot
Anita Pal
Level 14
Question about the task
Print three times
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
Plzz help me to find error
package com.codegym.task.task02.task0219; /* Print three times */ public class Solution { public static void print3(String s) { for(int i=0;i<3;i++) System.out.println(s); } public static void main(String[] args) { print3("window"); print3("file
16.07.2019
1311
views
8
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
406
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
413
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
336
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
676
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
470
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
531
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
2074
views
8
comments
0
Mary Khan
Level 23
Russia
Question about the task
Path update
Java Syntax
,
Level 9
,
Lesson 5
Under discussion
What my code doesn't get passed by validator?
What my code doesn't get passed by validator?
04.02.2022
390
views
2
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
607
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
501
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
1407
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
477
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
247
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
242
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
1391
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
434
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
307
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
456
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
377
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
1935
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
776
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
517
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
713
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
373
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
768
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
333
views
1
comment
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
How do I choose the right one?
Java Multithreading
,
Level 3
,
Lesson 6
Under discussion
Using the example from the previous lesson doesn't work
In the previous lesson, they have the line: Zoo.Mouse mouse = new Zoo.Mouse(); Why isn't the solution: obj = new Solution.TEST(); This won't compile, it says it doesn't know what TEST is.
01.01.2022
290
views
4
comments
0
Gellert Varga
Level 23
Szekesfehervar
Resolved
Files.move() method and moving directories
Oracle API says about this method: " This method may be invoked to move an empty directory. ... When invoked to move a directory that is not empty then the directory is moved if it does not require moving the entries in the directory. ... When moving a directory requires that its entries be mov
29.01.2022
334
views
4
comments
0
Azja
Level 32
Krakow
Question about the task
A convert can easily convert others
Java Multithreading
,
Level 6
,
Lesson 2
Resolved
Actually I don't understand this question in all
Need help with compare method
30.05.2019
1629
views
12
comments
1
Show more
1
...
41
42
43
44
45
...
366
Please enable JavaScript to continue using this application.