AI Academy
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
Maxine Hammett
Level 19
San Diego
Question about the task
Player and Dancer
Java Core
,
Level 4
,
Lesson 4
Under discussion
Need explanation on why this code works
I'm really confused over the code ((Player) person).play();. Why do we put Player person in parenthesis? if(person instanceof Player){ ((Player) person).play(); }else if(person instanceof Dancer){ ((Dancer) person).dance(); }
7/31/20
1251
views
6
comments
3
Ryan Woodward
Level 3
Vancouver
Question about the task
Minesweeper (Part 7/16)
Games
,
Level 0
,
Lesson 0
Under discussion
Runs in intellij, can't pass the verification though
Does anyone see the error in my code. When I run this in IntelliJ it compiles and runs as it should. Thanks in advance :)
10/26/20
602
views
1
comment
0
Jhoal
Level 22
Berlín
Question about the task
Who called me?
Java Syntax
,
Level 9
,
Lesson 2
Resolved
why index 2?
can someone explain me why do always we need to reference the index 2 in order to get the solution? Thanks :)
10/27/20
924
views
2
comments
0
Adarsh bangera
Level 3
Question about the task
Escaping characters
Java Syntax
,
Level 3
,
Lesson 6
Under discussion
what is wrong i am not getting what's wrong
🤔
10/26/20
578
views
2
comments
0
Jonas
Level 41
Vilnius
Question about the task
Circular iterator
Java Collections
,
Level 7
,
Lesson 4
Resolved
Please help with the remove method
Don't get it
3/26/20
1471
views
1
comment
2
Andrei
Level 26
Liverpool
Question about the task
Work up a sweat!
Java Multithreading
,
Level 5
,
Lesson 7
Resolved
what about buffer?
I have passed task, but I did nothing in run method, which has comment "// Process the buffer here". Dont we need to do something there?
9/30/20
642
views
1
comment
0
Bill Wu
Level 29
Wellington
Question about the task
Make a word chain
Java Multithreading
,
Level 2
,
Lesson 9
Resolved
Not sure about the requirement
My code works fine with the example, but fails the verification. I'm wondering about this: All words passed to the getLine method must be included in the resulting string, if possible. if not possible (a word not matching the condition) how should I deal with it? I deleted those ones in the result.
4/7/19
2351
views
26
comments
0
AlfredW
Level 23
Denver
Question about the task
Tracking changes
Java Core
,
Level 9
,
Lesson 11
Resolved
Just Understanding what they are looking for, Is this it?
I think this is what they are looking for. Obviously the result would be in the proper format...
10/26/20
619
views
3
comments
0
Joshua Tyrrell
Level 7
Poughkeepsie
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
How do I display the max of entered numbers? That's the only condition I'm not passing.
package com.codegym.task.task05.task0532; import java.io.*; /* Task about algorithms */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String a = reader.readLine(
10/21/20
692
views
2
comments
0
lukesky
Level 11
Zurich
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Resolved
Code works but task not verified Question
My code does exactly as requested. Any suggestions?
10/21/20
957
views
3
comments
0
Fabian Andiel
Level 9
Vienna
Question about the task
Find a substring
Java Multithreading
,
Level 2
,
Lesson 5
Under discussion
Don`t understand why the last condition won`t verify
Please help me, i tried it with string.length()-1 and string.length() and I doesn`t work both ways. Greetings Fabian
10/26/20
523
views
1
comment
0
Dmitri
Level 22
Seversk
Question about the task
HashSet of plants
Java Syntax
,
Level 8
,
Lesson 3
Resolved
I initialized the set in slightly different way.
I initialized the set in slightly different way. What is wrong with the validator?
10/25/20
844
views
3
comments
0
Nicolas Huet
Level 41
Provins
Question about the task
Tracking changes
Java Core
,
Level 9
,
Lesson 11
Under discussion
I don't see what to do next :[ it SEEMS to be working fine
As said int the title, when I test with my tests files it seems to be working just fine but obviously I missed something but I don't see it... Can someone help me?
7/2/19
1537
views
2
comments
0
Dmitrii
Level 38
Saint Petersburg
Question about the task
Archiver (part 12)
Java Multithreading
,
Level 7
,
Lesson 15
Resolved
FileProperties
Tried different ways to format numbers, either missing something or didn't find the right one
6/5/19
1806
views
3
comments
0
Niklas Braun
Level 33
Freiburg
Question about the task
Archiver (part 12)
Java Multithreading
,
Level 7
,
Lesson 15
Resolved
Is this a bug?
I have tried to format it in so many different ways but it is still not working.
6/23/20
701
views
1
comment
0
Andrei
Level 41
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Resolved
I get the " Exception in thread "main" java.lang.IndexOutOfBoundsException: Index 5 out of bounds for length 5 " error - pls help?
public class Solution { private static List strings; public static void main(String[] args) throws Exception { //write your code here strings = new ArrayList(); for (int i = 0; i < 5; i++){ BufferedReader reader = new BufferedReader(new InputStreamRe
10/23/20
1402
views
4
comments
0
raulGLD
Level 8
Cluj-Napoca
Question about the task
Task about algorithms
Java Syntax
,
Level 5
,
Lesson 12
Resolved
Output is correct, why is it not working?
Hey, I am not getting the "The program should display the maximum of the N entered numbers." checked. Here is my code, the output is correct, I've tried with N being 0 or lower and I don't print anything, which is correct, then I've tested with N being 1 or whatever and added even 0 and I still get
10/22/20
972
views
3
comments
0
Dinesh
Level 7
Delhi
Under discussion
I am not getting proper output
class Mortgage{ public static void main(String[]args){ int rateOfInterest = 6; float monthlyRoi = (rateOfInterest/100)*12; System.out.print("Rate of Interest : "+ monthlyRoi); } }
10/25/20
618
views
3
comments
0
Cristian
Level 13
Ploiesti
Question about the task
Sum of the digits of a three-digit number
Java Syntax
,
Level 3
,
Lesson 12
Under discussion
The output is 0 instead of 15. Why? Thank you so much!
public class Solution { public static void main(String[] args) { System.out.println(sumDigitsInNumber(546)); } public static int sumDigitsInNumber(int number) { //write your code here int sum = 0; while (number > 0) { sum = sum + number % 1
10/25/20
851
views
2
comments
0
Goran
Level 41
Belgrade
Question about the task
Words with numbers
Java Core
,
Level 9
,
Lesson 11
Resolved
Going mad here
I am getting correct output but still not passing! And as hint I am getting this : Be sure that your solution uses FileWriter. Am I missing something ?
6/21/20
780
views
6
comments
0
Anitamalina
Level 18
København
Question about the task
Positive number
Java Syntax
,
Level 4
,
Lesson 7
Under discussion
hm.. can't figure it out
I have tried several input and get right results.. can someone "see" what's wrong? :-)
10/25/20
590
views
2
comments
0
Anitamalina
Level 18
København
Question about the task
Describing numbers
Java Syntax
,
Level 4
,
Lesson 7
Archived
odd three digits number doesn't work :S
I don't understand why this fails ??
10/25/20
686
views
2
comments
0
Lex Medeiros
Level 18
San Jose
Question about the task
Ascending numbers
Java Syntax
,
Level 6
,
Lesson 11
Resolved
The code works but it fails the test
If someone could point me to what I am doing wrong I would appreciate it.
4/1/19
2962
views
3
comments
1
Brad Reed
Level 19
Hartford
Question about the task
Zombie cats, zombie dogs
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
quick clarification
Ok, so my code works and it is fine, but nothing displayed and it still passed. I did tell it to print the given lines, just nothing was out put onto the screen. I think I understand why but just looking for some clarifications if any of you all have some. Thanks in advance!
6/25/20
843
views
4
comments
0
towelie8
Level 15
Darmstadt
Question about the task
Climb, fly, and run
Java Core
,
Level 2
,
Lesson 12
Under discussion
I need help
help me plz.
8/28/20
690
views
4
comments
0
Timothy Chan
Level 11
Hong Kong
Question about the task
Minimum of N numbers
Java Syntax
,
Level 8
,
Lesson 11
Resolved
An Issue about the Answer
The question was solved but there is one issue I would like to ask. For public static List getIntegerList() throws IOException {, I created an list with the name list. but then for public static int getMinimum(List array) { I tried to write for (int i=0;i package com.codegym.task.task08.task0822;
10/24/20
658
views
2
comments
0
yehuda b
Level 23
Beersheba
Question about the task
Introducing tags
Java Core
,
Level 9
,
Lesson 11
Resolved
5th condition doesn't validate
I tried countless times, looked a few times in the help section, tested it with a few cases, and still it won't validate. The code handles even nested within nested within nested tags (x3). Does anyone have any suggestions or test cases I can try? Thank you very much!
10/20/20
804
views
5
comments
0
yz
Level 37
Jakarta
Question about the task
Between tabs
Java Multithreading
,
Level 2
,
Lesson 5
Resolved
any ideas?
last one
12/18/19
1488
views
4
comments
0
Jhoal
Level 22
Berlín
Question about the task
Code doesn't fix itself
Java Core
,
Level 3
,
Lesson 4
Resolved
help :)
I know it should be something easy and stupid but I've tried different things and nothing works. Nothing more is coming to my mind. Can anyone say me how it is the basic path to the solution?
10/24/20
813
views
3
comments
0
Bruno
Level 6
Sydney
Question about the task
Closest to 10
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
Can someone help me
I dont know why Im getting the result wrong
10/25/20
676
views
1
comment
0
Show more
1
...
123
124
125
126
127
...
375
Please enable JavaScript to continue using this application.