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
Victor Omoha
Level 8
Raleigh
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Resolved
what am i doing wrong please
package com.codegym.task.task08.task0817; import java.util.HashMap; import java.util.Map; import java.util.*; /* We don't need repeats */ public class Solution { public static HashMap createMap() { //write your code here HashMap map = new HashMap(); map.put("Victor",
14.10.2021
710
views
4
comments
0
Jason
Level 3
Ottawa
Under discussion
Why are interfaces and almost everything in Java referred to as contracts?
I do not understand the use of legal jargon to describe a template or format etc within a programming language. When I write a method with parameters, I am not making a contract, I am making a template that requires that input or it wont work. Sure a contract is the same in the sense that if you d
01.10.2021
412
views
4
comments
0
Dan
Level 26
Clarksville
Question about the task
Adding a file to an archive
Java Collections
,
Level 1
,
Lesson 6
Under discussion
Unsure of what the problem is
To my fellow CodeGym friends, I do not know what could possibly be wrong with my code. I have spent so long working on this, and I will admit to even cheating by looking at the solution. I fail to see any cause for my lack of validation. I hope that some of you experienced solvers out there can sho
11.10.2021
606
views
7
comments
0
Hoist
Level 2
San Diego
Question about the task
Multiplication table
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
Help pls --- Error code: 10x10 Table / Array is not *initialized / instantiated.
I have built the Multiplication table 3 different ways. Error code is 10x10 Table / Array is not *initialized / instantiated. No clue ... see code
12.10.2021
1110
views
10
comments
0
Jurij Thmsn
Level 29
Flensburg
Question about the task
Snake (part 18)
Java Multithreading
,
Level 2
,
Lesson 18
Resolved
How to make it faster?
On my device, the snake game seems to stutter. Maybe it is too slow(it is quite old). I guess the problem is the print method? (not quite sure, though) I tried to make the print method run faster but I am not quite satisfied yet. The way I am iterating through the snake's body is bugging me, I gu
12.10.2021
422
views
4
comments
0
Bill Wu
Level 29
Wellington
Question about the task
String formatting
Java Multithreading
,
Level 2
,
Lesson 7
Resolved
The last requirement not verified
I don't understand why the output matches but the last requirement not met. The same happens with the task 2205, but task 2206 verified.
05.04.2019
1907
views
7
comments
6
Vo
Level 41
Sofia
Question about the task
Make a word chain
Java Multithreading
,
Level 2
,
Lesson 9
Under discussion
What could be wrong here?
So far I tried different combinations of words, including a combination corresponding to the 'if possible' part of the 6th condition. Everything seems to work perfectly fine, but I still don't get the last 2 conditions. One of my theories is that my getLastWord method has an if condition with a retu
07.10.2021
670
views
5
comments
0
Gellert Varga
Level 23
Szekesfehervar
Question about the task
Searching for the right lines
Java Core
,
Level 9
,
Lesson 11
Resolved
How many hits is that?
if words == [file, view, In, out, code] and the lines read from the file: line1 == "in in xyz qwerty 12345" line2 == "file! code. view? klmno xyzw" Qestion: line1: 0 or 2 hits? line2: 3 or 0 hits?
11.10.2021
362
views
2
comments
0
Alan
Level 8
montreal
Question about the task
Minimum of four numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
variable min might not have been initialized return min; ^ 1 error. how do you initialized min?
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) { //write your code here int min; if (a <= b & a <= c & a <= d) min = a; else if
21.09.2021
777
views
1
comment
0
Josephine
Level 26
Normal
Question about the task
Between tabs
Java Multithreading
,
Level 2
,
Lesson 5
Resolved
what is the error here.Can someone look through?
what is the error here.Can someone help?
23.03.2021
503
views
1
comment
1
Josephine
Level 26
Normal
Question about the task
Find a substring
Java Multithreading
,
Level 2
,
Lesson 5
Resolved
someone please guide me ,why this is not validating?
someone please guide me ,why this is not validating?
12.03.2021
480
views
2
comments
1
Shashikant Sharma
Level 8
Surat
Question about the task
Shuffled just in time
Java Syntax
,
Level 7
,
Lesson 12
Under discussion
Now What?
This Program seems absolutely fine to me but still it doesn't meet third requirement. why??
10.10.2021
382
views
2
comments
0
Onar D.
Level 7
Question about the task
Minimum number of statics
Java Syntax
,
Level 6
,
Lesson 11
Under discussion
1 star to this task.
dont get it att all. just woth trying add some different places. but why and how it worked did not undesten. readet like 2- 3 books , and many websites. and do not get it. ain this level not explanation befor task. garbage cleaner, how it works. but how works static , and array list. i find array in
10.10.2021
475
views
1
comment
0
PeterC
Level 28
France
Question about the task
StringTokenizer
Java Syntax
,
Level 9
,
Lesson 6
Archived
StringTokenizer - correct results, the task doesn't pass.
This is silly. It works as it's supposed to. Can anyone help?
10.10.2021
569
views
4
comments
0
Shashikant Sharma
Level 8
Surat
Question about the task
Min and max in arrays
Java Syntax
,
Level 7
,
Lesson 12
Resolved
What's Wrong In This Code?
I Got The Output That I required But The Third requriement fails: output: 111 -150
03.10.2021
718
views
9
comments
0
Onar D.
Level 7
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
i tryed something like 7 - 9 hours to solve this problem i the end i watch coorect solution
why there arrays ?! why?! we are not learned arrays. my experience and knowledge only what we learn and study before this task. based on previous information. wtf. the founders wrote it like this. the fact that everyone finds the right answer in the community and says and writes from one person to
05.10.2021
658
views
7
comments
0
gery
Level 9
Islamabad
Question about the task
Display numbers in reverse order
Java Syntax
,
Level 7
,
Lesson 12
Resolved
correction for: wrong arraylist syntax at line 18
public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); //write your code here ArrayList s = new ArrayList(); for(int i = 0; i<10; i++) { s.add(
23.09.2018
1959
views
3
comments
2
Swati
Level 8
Pune
Question about the task
String array in reverse order
Java Syntax
,
Level 7
,
Lesson 4
Resolved
what is wrong
My program runs successfully.but while verify giving error. The task failed to pass: "The program should display 10 strings, each on a new line. " "The strings must be displayed in reverse order."
15.12.2018
2308
views
6
comments
1
Gellert Varga
Level 23
Szekesfehervar
Question about the task
Tracking changes
Java Core
,
Level 9
,
Lesson 11
Resolved
unraveling the mystery of the validator and requirements
The validator said me: "Be sure that the lines list has the ADDED label with the required lines in the correct places." I checked the program with the 22 test cases shown in the attached image and my program gives the outputs shown in red. (I made sure that this program would never be able to give
06.10.2021
647
views
11
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
Prices
Java Core
,
Level 8
,
Lesson 11
Under discussion
I have questions
In a previous task where we had to work with the CRUD, the arguments list had the only field capable of containing spaces enclosed by quotes, which the engine interpreted all as a single argument rather than breaking apart into multiple arguments. Like if we pretend I'm creating the first line in t
07.10.2021
714
views
20
comments
0
Lukas Smetana
Level 10
London
Question about the task
Distance between two points
Java Syntax
,
Level 6
,
Lesson 8
Resolved
I dont understand the exercise
Can you explain what i need to do?
25.07.2019
2827
views
13
comments
2
Justin Smith
Level 41
Greenfield, USA
Question about the task
Files and exceptions
Java Core
,
Level 8
,
Lesson 11
Resolved
Validator thinks I'm not catching the exception
Not sure why this isn't validating. It works exactly as they request when tested with real files. I think this might be one of those situations where the reason the validator gives is actually not related at all to the problem. I did check the solution in this case and note that they declare the Fil
06.10.2021
508
views
5
comments
0
Justin Smith
Level 41
Greenfield, USA
Question about the task
Finding data inside a file
Java Core
,
Level 8
,
Lesson 11
Under discussion
Validation says I am required to read file with InputStream, solution uses BufferedReader!
So I started out with a BufferedReader which you can see in the attached code. This is because FileInputStream doesn't have a readLine() method, but BufferedReader does. It failed validation and said I have to use InputStream instead. After scratching my head for a long time trying to figure out h
05.10.2021
697
views
3
comments
0
Ash Ka
Level 13
Calgary
Question about the task
Adding
Java Syntax
,
Level 4
,
Lesson 16
Resolved
The result seems correct but the task is failing
Though I am adding -1 to the sum before coming out of loop, still I see the below recommendation : "The program must calculate and display the sum of the entered numbers. RECOMMENDATION FROM YOUR MENTOR -1 should be included in the sum."
22.02.2019
2135
views
4
comments
0
Rich
Level 23
San Diego
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Resolved
out put is good.
just need a hint why code works but doesnt pass please
06.05.2020
716
views
3
comments
0
Onar D.
Level 7
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
i did many very many try. my code is working. why it cant pass task , chapter display maximum n numbers. it does.
please.watch in comment of code 3 try, last one in very end. (in real them was much more.). all worked but why . maybe i dont understand the task but i tryed everything i could though about.
04.10.2021
443
views
3
comments
0
Onar D.
Level 7
Resolved
what wrong with code.
nznnzi turned on button solution for this task. i feom phone android. and more buttons do not see att all. only one button and it turn on. and where questions dissapirez from mine. ? i think in ap or website some mistakes. i did right about quessions that every one can see my code.
24.09.2021
337
views
2
comments
0
Onar D.
Level 7
Resolved
why cant int m assign value of x1 ?
why cant int m assign value of x1 ? there two integers why compiler not allowed that.
23.09.2021
365
views
2
comments
0
Onar D.
Level 7
Question about the task
Roy G. Biv…
Java Syntax
,
Level 3
,
Lesson 6
Resolved
it close but not completely.
it works, but not completely. Red a = new Red(); System.out.println(a); all day trying to complete this task, without internet only www.w3schools.com , and couple of book of java (head first one them). This code is all that I was able to achieve for this moment. I dont know how to get rid of (my
14.06.2020
951
views
3
comments
0
Onar D.
Level 7
Question about the task
Drawing a rectangle
Java Syntax
,
Level 4
,
Lesson 13
Resolved
why my code is not accepted by the task?
why my code is not accepted by the task?
26.09.2021
532
views
2
comments
0
Show more
1
...
54
55
56
57
58
...
371
Please enable JavaScript to continue using this application.