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
Thomas
Level 12
Scottsdale
Question about the task
Seasons on Terra
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
How did this ugly Code pass ? .. output is incorrect ...... How do I fix it for Winter ?
if(month>=3 && month<=5) { System.out.println("spring"); } else if(month>=6 && month<=8) { System.out.println("summer"); } else if(month >=9 && month <=11) { System.out.println("aut
24.05.2019
1311
views
6
comments
1
R3fiX
Level 12
Tarnow
Question about the task
Animal set
Java Syntax
,
Level 8
,
Lesson 11
Under discussion
Object comparison
I know, that there is better and easier way to write removeCats method, but I'm just wondering, why my version does not work. The error tells about noSuchElementException so it seems that comparing objects returning false in every case. I tried also with '==' but it didn't work as well. Thanks for h
15.08.2019
1312
views
1
comment
0
Alex
Level 24
Sibiu
Question about the task
Make a family
Java Syntax
,
Level 8
,
Lesson 11
Under discussion
Everything prints correctly, but fails to last requirement
Everything prints correctly with and without the for loop.What is the problem ? It fails to last requirement. package com.codegym.task.task08.task0824; import java.util.ArrayList; /* Make a family */ public class Solution { public static void main(String[] args) { //write your code
12.08.2019
1248
views
2
comments
0
Przemysław Dr
Level 20
Tricity
Question about the task
Working with dates
Java Syntax
,
Level 8
,
Lesson 11
Resolved
How parsing should look like?
Does anyone successfully parsed given string? I'm aware that this task could be done with a different approach but I would like to understand why it is not parsing... public static void main(String[] args) throws ParseException { String date = "FEBRUARY 4 2015"; Date date1 = new Si
09.08.2019
1492
views
2
comments
1
Denis
Level 22
Kharkiv
Question about the task
All that moves
Java Core
,
Level 3
,
Lesson 2
Under discussion
give me your help bro :(
i dont understand how i can ddo this, but i understand all process
24.06.2019
1182
views
1
comment
0
Denis
Level 22
Kharkiv
Question about the task
Brain training
Java Core
,
Level 5
,
Lesson 12
Under discussion
help me pls
gime me a code for my full understanding.thanks
26.06.2019
1136
views
2
comments
0
Jen P
Level 26
Question about the task
Iterating through a file tree
Java Collections
,
Level 1
,
Lesson 2
Archived
Error : The output stream to the file must be closed.
I constantly met errors of "The output stream to the file must be closed." However, as shown in my current solution, I am pretty sure I have explicitly closed all file output stream, writer , or reader objects. In addition, referring to https://codegym.cc/help/4001 where we shared a similar solutio
13.08.2019
1380
views
2
comments
0
Boris the Llama
Level 20
Maidstone
Question about the task
Following a pattern
Java Core
,
Level 6
,
Lesson 13
Resolved
Working correctly but not verifying?
The code seems to be working, but it doesn't verify. In intelliJ it shows the output that is required, but fails the 4th condition.
11.08.2019
1259
views
2
comments
0
Abu Bakker Siddiq H
Level 5
Salem
Question about the task
Three numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
Why the last case is not passing at all
Do please refer the code and help me !
29.07.2019
1085
views
3
comments
0
Jay
Level 17
Washington
Question about the task
Buggy initializeIdAndName
Java Core
,
Level 3
,
Lesson 2
Under discussion
Task verified BUT I have a question about using "this"
Inside the InitializeAndName method, I initially used: return new User(); and my code did not verify. However, after using "return this;", the code verified. What I understand from that is 1. the return new User(); returned a new instance of the User class without any parameters 2. while the "retur
13.08.2019
1028
views
2
comments
0
Scott
Level 13
Boston
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Archived
Multiple Working Solutions Fail Task 3 & 4
Attempted multiple ways and getting the correct output, but the 3 & 4 task requirements show as failures. Attached is one of the working solutions.
13.08.2019
1278
views
2
comments
1
hidden #10462592
Level 8
Question about the task
Adding
Java Syntax
,
Level 4
,
Lesson 16
Resolved
Desired result obtained but yet failed to satisfy conditions
The code is able to give output correctly and it is also a infinite loop which means user can enter multiple values and still get the desired output. Alas, it fails to fail to satisfy the conditions mentioned. why?
13.08.2019
1089
views
2
comments
0
Anjali Sharma
Level 6
Chennai
Question about the task
Crossing the road blindly
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
I don't know why this is showing error
Any suggestions ?
03.10.2018
1535
views
5
comments
0
hidden #10366080
Level 5
Question about the task
Number of days in the year
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
this is a working code, but i need optimization
if(year % 400 == 0){ System.out.println("Number of days in the year: " + 366); }else if(year % 100 == 0 && year % 400 != 0 ){ System.out.println("Number of days in the year: " + 365); }else if(year % 4 == 0){ System.out.println("Number of
06.11.2018
1307
views
6
comments
0
Vatsal Patel
Level 15
Naperville
Question about the task
Good or bad?
Java Syntax
,
Level 4
,
Lesson 4
Resolved
I am not sure what the issue is?
The code logic works but I am failing in the requirements.
23.01.2019
2179
views
7
comments
0
Brandon Nicolle
Level 5
Edmonton
Question about the task
Dividing is good
Java Syntax
,
Level 3
,
Lesson 1
Under discussion
I don't understand
How is the div function being ran 3 times by coding System.out.println??? I'm not actually calling the div function, I'm only asking the compiler to print out a / b, so why is it doing it 3 times? I don't understand how the compiler pulls all this stuff together. Can somebody explain this to me in
10.08.2019
1006
views
4
comments
0
Niladri pradhan
Level 33
Mumbai
Question about the task
Going national
Java Syntax
,
Level 8
,
Lesson 11
Archived
Couldn't pass 4th condition
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; public class solution { public static void main(String[] args) throws IOException {
04.08.2019
838
views
2
comments
0
علي حجار
Level 18
Bursa
Question about the task
Going national
Java Syntax
,
Level 8
,
Lesson 11
Archived
help
output is currect , but i can ou got it
04.12.2018
1749
views
7
comments
0
harshshah
Level 9
Gandhinagar
Question about the task
Display right away
Java Syntax
,
Level 3
,
Lesson 3
Under discussion
how to use assigment operator
I cannot find the error in the this code.
21.02.2019
2046
views
5
comments
0
shovan
Level 22
Kolkata
Question about the task
Turnip
Java Core
,
Level 3
,
Lesson 11
Under discussion
it does not display anything
why IndexOutOfBounds Exception?
30.06.2019
1291
views
2
comments
2
KARAN BHOITE
Level 15
Nagpur
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
plz tell me...
i gave up.
10.08.2019
1166
views
3
comments
0
季军
Level 38
Shanghai
Question about the task
Adding a file to an archive
Java Collections
,
Level 1
,
Lesson 6
Under discussion
pls help me
Don't know what's wrong with my solution, it run just as the condition on my computer, but still cannot pass the test. It seems that some kind of exception occured, but iI cannot figure it out...
10.08.2019
1118
views
2
comments
0
sailaja
Level 3
Hyderabad
Question about the task
Plan to conquer the world
Java Syntax
,
Level 3
,
Lesson 8
Under discussion
what's wrong in my code
package com.codegym.task.task03.task0318; /* Plan to conquer the world */ import java.io.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Strin
30.07.2019
1336
views
4
comments
0
Picvajzmen
Level 20
Belgrade
Question about the task
Different methods for different types
Java Core
,
Level 5
,
Lesson 12
Resolved
works but will not verify..
im guessing its because of the way it checks for verification but i don't know.
24.07.2019
1268
views
3
comments
0
Shaun Forster
Level 14
United Kingdom
Question about the task
Dividing by zero
Java Syntax
,
Level 9
,
Lesson 11
Resolved
Keeps saying method does not exist, what am I missing?
Won't validate because it thinks I do not have the divideByZero method when I clearly do. I must be missing something obvious.
13.08.2019
1491
views
2
comments
1
Ajinkya
Level 0
Question about the task
Kind words for the teacher
Java Syntax
,
Level 0
,
Lesson 4
Resolved
what is the error in the program?
I am unable to identify the mistake in the program
01.08.2018
1634
views
5
comments
1
Ahmed
Level 23
Amsterdam
Question about the task
CRUD 2
Java Core
,
Level 7
,
Lesson 10
Resolved
Doesn't validate switch statement
Can anyone help out here? I already used switch statements but the validator doesn't recognize it.
13.08.2019
1118
views
2
comments
0
Gábor
Level 14
Budapest
Question about the task
Flip the array
Java Syntax
,
Level 7
,
Lesson 4
Resolved
println method not showing anything.
Just when it is in the for merthod. if it's outside then showing the value of the needed array. Also in both case no error is coming..
08.08.2019
1141
views
3
comments
0
Joy Majumdar
Level 16
Kolkata
Question about the task
Software update
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Not matching the req why ?
point out
16.04.2019
1186
views
3
comments
0
Deepak Chandra
Level 16
Visakhapatnam
Question about the task
Identical words in a list
Java Syntax
,
Level 10
,
Lesson 11
Under discussion
Help please
Hey guys everything is fine with my code it works and is verified succesfully. I am posting this so that you guys could suggest me any further modifications in my code(i.e if there is some unnecessary code, or may be i could have written some logic better etc). Go through my code and suggest me if
24.06.2019
1188
views
4
comments
0
Show more
1
...
282
283
284
285
286
...
366
Please enable JavaScript to continue using this application.