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
SAYAN SAMANTA
Level 10
Bangalore
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Resolved
wherere is the problem?
package com.codegym.task.task08.task0817; import java.util.HashMap; import java.util.Map; /* We don't need repeats */ public class Solution { public static HashMap<String, String> createMap() { HashMap<String,String> map = new HashMap<String,String>(); ma
8/29/18
2062
views
2
comments
0
Prabhanjan Pandey
Level 2
pune
Question about the task
Minimum of two numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
min of two nos
i am returning the value but then also it is saying that min method must return the minimum of both numbers.
8/12/18
3279
views
13
comments
1
Julien
Level 15
Paris
Question about the task
One large array and two small ones
Java Syntax
,
Level 7
,
Lesson 4
Resolved
Is there a best way to approach this ?
Hello guys, i'm looking to refactor this method. It split an Array of integers int[] in two smaller ones (array1 and array2) and return those as an Object[]{array1,array2} I'm pretty sure i can give some fresh to this algorithm. Someone would like to review this code ? private static Object[] in
5/10/19
1382
views
7
comments
1
Whitney
Level 14
Onalaska
Question about the task
Cat relations
Java Syntax
,
Level 6
,
Lesson 11
Resolved
Output seems to be correct, but I'm not sure where the error is?
Example output: The cat's name is Grandfather Tiger, no mother, no father The cat's name is Grandmother Puss, no mother, no father The cat's name is Father Oscar, no mother, Grandfather Tiger is the father The cat's name is Mother Missy, Grandmother Puss is the mother, no father The cat's name is
10/30/19
1839
views
5
comments
0
Kent Hervey
Level 19
Question about the task
ConsoleReader class
Java Syntax
,
Level 6
,
Lesson 8
Under discussion
Exception error
I am getting an error and don't know why: Error:(43, 50) java: unreported exception java.lang.Exception; must be caught or declared to be thrown public static String readString() throws Exception { //write your code here InputStream inputStream = System.in; Reader inputStreamRe
10/25/19
1484
views
1
comment
0
Han
Level 24
Question about the task
Using JSON to convert from one class to another
Java Collections
,
Level 3
,
Lesson 5
Under discussion
I don't know how to use the className field
I'm stuck on how to serialize this. Somehow I need to let the mapper use the className field to serialize json into that object. Is there a method I'm missing? I could really use a clue :)
10/28/19
1097
views
1
comment
0
Henriett Tóth
Level 18
Budapest
Question about the task
Greater than 10? You're not a good fit for us
Java Syntax
,
Level 8
,
Lesson 8
Resolved
Help pls!
Help pls! I don't understand where is the problem. :(
10/29/19
1146
views
2
comments
0
Marcin Olech
Level 41
Kraków
Question about the task
Chat (part 21)
Java Multithreading
,
Level 6
,
Lesson 15
Under discussion
Im confused, 3 requirements. (ClientGuiController)
I honestly don't know why it doesnt work. 'this' passed to ClientGuiView constructor is wrong? What about getModel method? And also getServerAddress, getServerPort and getUserName seems right to me.
10/28/19
1053
views
1
comment
0
Glenn Akens
Level 3
Rochester
Question about the task
Our first converter!
Java Syntax
,
Level 2
,
Lesson 2
Under discussion
I'm getting the correct output, however still getting an error message
package com.codegym.task.task01.task0130; /* Our first converter! */ public class Solution { public static void main(String[] args) { System.out.println(convertCelsiusToFahrenheit(41)); } public static double convertCelsiusToFahrenheit(int celsius) { //write your cod
10/28/19
1886
views
3
comments
0
nagabenang
Level 6
Bekasi
Question about the task
Triangle of eights
Java Syntax
,
Level 4
,
Lesson 13
Resolved
Reverse Triangle
I made this just for fun. Hope it could help you to understand loop. Probably you can also help to compact it more. :p public class Solution { public static void main(String[] args) throws Exception { int a; int b; int c; for (b = 5; b > 0; b--){ for (a = 0; a < b; a++){ System.out.pr
6/28/19
1538
views
1
comment
1
Sinan
Level 1
Dortmund
Under discussion
where can I see the Solution of the tasks
Hi, i'm new. I would like to know if it is possible to see the solution of the tasks somewhere? Couse I've did a task wrong and dont know the solution and I would like to see the right way. The tipps dont help me
10/26/19
1102
views
1
comment
0
Ian Frierson
Level 15
Overland Park
Question about the task
Cats should not be abstract!
Java Core
,
Level 2
,
Lesson 6
Resolved
I dont understand what im missing
i dont understand what im missing package com.codegym.task.task12.task1215; /*
10/29/19
1291
views
2
comments
0
Niket
Level 8
Kolkata
Question about the task
This age doesn't work for me…
Java Syntax
,
Level 4
,
Lesson 1
Resolved
I have 2 Solutions, which one is correct?
First one is: public void adjustAge(int Age) { age = Age + 20; System.out.println("The age in adjustAge() is " + age);//In this case this prints 40 as age here also. } Second one is: public void adjustAge(int age) { this.age = this.age + 20;
1/7/19
2608
views
7
comments
0
iqbalhussain
Level 2
Peshawar
Question about the task
Reading and writing to a file: Human
Java Core
,
Level 10
,
Lesson 2
Archived
Need Help
Any one Solved this task...
1/24/19
1389
views
5
comments
0
Robert
Level 8
Lombard
Question about the task
Reading and writing to a file: CodeGym
Java Core
,
Level 10
,
Lesson 2
Under discussion
Been looking at this to long
I give up. I can not figure out what I am doing wrong. Any ideas? Thank you.
9/24/19
1194
views
3
comments
0
Joshua Ingersoll
Level 5
Brighton
Question about the task
Rule of the triangle
Java Syntax
,
Level 4
,
Lesson 4
Resolved
Help determining error in code
Can someone help me determine what I have done wrong and why this will not execute properly? I have also tried having just an else clause rather than the else if( condition ) clause but that also did not fix the problem.
10/25/19
1243
views
2
comments
0
Joshua Ingersoll
Level 5
Brighton
Question about the task
Crossing the road blindly
Java Syntax
,
Level 4
,
Lesson 4
Resolved
Code not completing requirments
Hello, Can anyone help me determine why my code will not satisfy the requirements? I have copied the same code into Coolbeans and I have entered every number 1-60 and every number gives the correct output. What am I doing wrong? Thank you!
10/29/19
1037
views
2
comments
0
mail.musa.khan
Level 22
Bloomington
Question about the task
Robot wars
Java Core
,
Level 3
,
Lesson 11
Under discussion
The validation fails and it asks me to implement canDefend interface, what am I missing?
I can't figure this out. I have implemented canDefend interface, but the compiler doesn't seem to agree.
10/29/19
1347
views
5
comments
0
hidden #10536831
Level 10
Question about the task
Kind Emma and the summer holidays
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Could you help?
What is wrong?
10/29/19
948
views
2
comments
0
vladimir.plamadeala@endava.com
Level 10
Chisinau
Question about the task
Set of cats
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Why the last condition is failing?
In IntelliJ it displays two results.
10/29/19
1988
views
4
comments
0
Andrew
Level 29
Seattle
Question about the task
Correct the bug. Classes and interfaces
Java Core
,
Level 9
,
Lesson 11
Resolved
No idea...
Hint please.
3/1/19
1831
views
6
comments
2
Павел Артеменко
Level 41
Krasnodar
Question about the task
Contextual advertising
Java Core
,
Level 9
,
Lesson 11
Resolved
Am I missed something?
All works as per description, but verifying failed on last 2 conditions.
4/28/19
1348
views
2
comments
1
Luyi
Level 31
Kosice
Question about the task
Inheriting an inner class
Java Multithreading
,
Level 4
,
Lesson 4
Under discussion
what is the popper way?
Hi what is the proper way of achieving the task: "The BigHall class must be a descendant of the Building.Hall class." I have done it this way: public class BigHall extends Building.Hall { public BigHall(Building b){ b.super(null); } But I am not sure to be honest
10/28/19
1435
views
2
comments
0
Jesús de Llera
Level 23
Badajoz
Question about the task
Following a pattern
Java Core
,
Level 6
,
Lesson 13
Resolved
The program displayed too much data on the console (on the screen)???
Last condition not verified. Don't know why. Neither do I know why the validator is complaining about too much data on screen....
6/14/19
1947
views
2
comments
1
Cristian
Level 16
Bucharest
Question about the task
Static cats
Java Syntax
,
Level 6
,
Lesson 11
Archived
I have one compile error. Please, help me!
package com.codegym.task.task06.task0614; import java.util.ArrayList; /* Static cats */ public class Cat { //write your code here public static ArrayList cats = new ArrayList<>(); public Cat() { } public static void main(String[] args) { for (int i = 0; i <
10/28/19
1216
views
3
comments
0
Season10
Level 14
Question about the task
Positive and negative numbers
Java Syntax
,
Level 4
,
Lesson 7
Resolved
Note that 0 is not a positive or negative number.
Can someone help me? I try but I don't know why
10/28/19
1646
views
2
comments
0
Robert Constantinescu
Level 1
Bucharest
Question about the task
Five winners
Java Syntax
,
Level 8
,
Lesson 11
Under discussion
Am i missing something?
The algorithm looks like it's sorting the array in descending order. But for some reason, even though the displayed numbers are the biggest five. It fails testing? Is the algorithm wrong? or maybe something else? Kindly let me have your answers. Thank you
10/27/19
1246
views
3
comments
0
Leontin Vasii
Level 6
Iasi
Question about the task
Minimum of three numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
Hy....I am stuck here...!!!
Help me pls with some hint's.....
10/28/19
1347
views
1
comment
0
Madhu
Level 9
Question about the task
Shortest or longest
Java Syntax
,
Level 7
,
Lesson 6
Under discussion
Last two conditions are not getting....can anyone help me??
.........
8/11/19
1193
views
1
comment
0
Зоран Јањић
Level 8
Teslic
Question about the task
Even and odd digits
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
Any help please?
Cant figure out the rest .
10/25/19
1216
views
1
comment
0
Show more
1
...
266
267
268
269
270
...
374
Please enable JavaScript to continue using this application.