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
Andrei
Level 41
Question about the task
Static modifiers and exceptions
Java Core
,
Level 5
,
Lesson 9
Under discussion
What is this task trying to teach us? I don't understand the use of the IF clause to pass the verification - throw/throwing exception in static block
Hello! Can somebody please explain why we need an if clause for the program to verify? Why isn't the error just thrown when we run the code? Thanks
12/7/20
753
views
8
comments
0
Andrei
Level 41
Question about the task
Static modifiers: part 1
Java Core
,
Level 5
,
Lesson 9
Resolved
Creating a static block and putting inside elements of an future created map. How is this possible?
Hello, so we have the program below. The static block is last. Upon creation of the class, from my knowledge the first elements that will be created are static variables and static blocks of code. My question is, considering that the static block of code will be created before the map element, how
12/7/20
650
views
8
comments
0
Weichen Ouyang
Level 25
San Jose
Question about the task
Different methods for different types
Java Core
,
Level 5
,
Lesson 12
Resolved
My code works, however, I would like to receive critiques from you guys.
Is there other possible structure to implement the same functionality? Here is my code: public static void main(String[] args) throws IOException { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); while(true){ String s = r.readLine(); i
9/6/19
1685
views
2
comments
4
Denis
Level 22
Kharkiv
Question about the task
Static modifiers and exceptions
Java Core
,
Level 5
,
Lesson 9
Under discussion
help me pls
cant understand
6/26/19
1751
views
4
comments
0
Bohdan
Level 8
Milan
Question about the task
Snake (Part 19/20)
Games
,
Level 0
,
Lesson 1
Resolved
I have a bug.
I completed all the quests, but it doesn't accept the last one, where i have to setTurnTimer in the method onTurn.
9/3/20
650
views
3
comments
0
Aditya Sinha
Level 17
Bangalore
Question about the task
Static modifiers: part 1
Java Core
,
Level 5
,
Lesson 9
Resolved
Help with the solution
Not able to figure the problem
2/17/19
1644
views
2
comments
0
Michał Pawłowicz
Level 18
Question about the task
The early bird gets the worm
Java Core
,
Level 6
,
Lesson 13
Under discussion
Can't match the first requirement, help please
I've tried also with the currentThread, and it still is not checked as correct, I have no idea what should i change. I'll appreciate any sort of help. Thank you from the mountain.
4/18/20
1402
views
3
comments
0
Stephen Haokip
Level 8
imphal
Question about the task
Method quartet
Java Syntax
,
Level 8
,
Lesson 6
Resolved
guy the last second condition is left
i have no idea how to do it please need help
6/23/20
1407
views
3
comments
1
The Chief
Level 18
Question about the task
Display numbers in reverse order
Java Syntax
,
Level 7
,
Lesson 12
Under discussion
The compiler says it can't find the ArrayList symbol.
On line 17, the compiler says it can't find the ArrayList symbol. I don't understand why.
12/5/20
678
views
2
comments
0
Dmitri
Level 22
Seversk
Question about the task
Fix four mistakes
Java Core
,
Level 4
,
Lesson 8
Resolved
Looks like all requirements are fulfilled.
Looks like all requirements are fulfilled. What am I missing?
12/6/20
565
views
1
comment
0
Angelo Spampinato
Level 18
Boston
Question about the task
Request parser
Java Core
,
Level 5
,
Lesson 12
Under discussion
Not sure why the 3rd condition isn't passing
Could anyone help me figure it out? Both examples they gave are displaying exactly as they should. Thanks!
7/21/20
635
views
1
comment
0
Denys Pits
Level 41
Question about the task
Synchronized methods
Java Core
,
Level 7
,
Lesson 10
Under discussion
Why 4???
Why it is necessary to add synchronized to method4, but not to method5?
12/5/20
556
views
1
comment
0
liutas
Level 5
Priekule
Question about the task
18+
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
Why when i press RUN nothing happens ? no error in the code
package com.codegym.task.task04.task0422; /* 18+ */ import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws Exception { Scanner scan = new Scanner(System.in); String name = scan.nextLine(); int age
12/5/20
627
views
1
comment
0
Chandan Thapa
Level 22
Dubai
Question about the task
Different methods for different types
Java Core
,
Level 5
,
Lesson 12
Resolved
got the correct answer however not passing the requirements
What am I doing wrong below? hints would be great!! Thanks :)
12/4/20
630
views
6
comments
0
hidden #10687429
Level 6
Question about the task
Rule of the triangle
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
Won't validate and I don't understand why
I've tested my work and it seems to work fine but won't validate. The first condition rules it out if it's == The second rules in those whose sums are greater than the part
12/5/20
619
views
2
comments
0
Harshitha
Level 5
Chennai
Question about the task
Sam I Am
Java Syntax
,
Level 3
,
Lesson 6
Resolved
Sam I Am
Can anyone tell me what is wrong in my code.
7/10/20
948
views
2
comments
1
Шарох
Level 12
Question about the task
Calling a constructor from a constructor
Java Syntax
,
Level 5
,
Lesson 9
Resolved
Hi Coders!
I don't know how should I call another constructor?
11/11/20
1138
views
7
comments
0
thisisalongname
Level 15
Spokane
Question about the task
Price of apples
Java Syntax
,
Level 4
,
Lesson 1
Under discussion
Question on the Difference
I figured it out after a while, but can someone explain why in this example "Apple.applePrice" works and "this.applePrice" doesn't? I'm sure it has to do with the difference in static and non-static but I don't understand it. public class Solution { public static void main(String[] args) {
4/23/19
1668
views
2
comments
1
Arko Sarkar
Level 8
Mumbai
Question about the task
Price of apples
Java Syntax
,
Level 4
,
Lesson 1
Under discussion
Why this.applesPrice doesn't work here?
I've figured out the answer by hints here, but want to know why 'this' doesn't work?
8/25/18
2006
views
3
comments
2
LennyMan
Level 25
Lucca
Question about the task
Arithmetic mean
Java Syntax
,
Level 5
,
Lesson 5
Resolved
All the condition works, but last one cannot be validate
The code its working, but it can't be validate by the last condition (The displayed result should match the task conditions for any input data.) I dont understand where is the problem. i just notice that if you start with -1, the result is NaN. I dont know what this mean actually.
12/3/20
902
views
3
comments
0
divya
Level 5
hyderabad
Question about the task
A name is a name
Java Syntax
,
Level 4
,
Lesson 16
Under discussion
can anyone help me at this line of code
System.out.println("I was born on "+mm++dd+\/+yyyy);
12/3/18
1823
views
16
comments
0
Aleksandr
Level 22
Moscow
Question about the task
Sorting even numbers from a file
Java Core
,
Level 3
,
Lesson 11
Resolved
Hello all, As i think i did what task wants but it didn't work
I go trhow file by bites if it is char between 48 -57 i add it in to string and than check, if line finished by (13) i check is number even? yes add to arr. Than sort array and show it on display. All works, but task don't accepted it. Can you help please?
12/2/20
737
views
4
comments
0
Jurij Thmsn
Level 29
Flensburg
Question about the task
Plan to conquer the world
Java Syntax
,
Level 3
,
Lesson 8
Resolved
Task in IntelliJ
I got the code right so it works in the browser and is correct . But if I run the same code on IntelliJ, the program just says: /Users/test/Desktop/jdk-15.0.1.jdk/Contents/Home/bin/java -javaagent:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar=63276:/Applications/IntelliJ IDEA CE.app/Co
12/2/20
896
views
4
comments
0
Andrei
Level 41
Question about the task
Food
Java Core
,
Level 4
,
Lesson 4
Resolved
Can somebody please explain this line: " Selectable selectable = new Food(); " ?
Below is the program. But please clarify for me the line in the subject? It the new Food() selectable object part of Selectable interface? I thought you can't instantiate an interface? public class Solution { public static void main(String[] args) { Food food = new Food(); Sel
12/1/20
731
views
3
comments
0
Talia Mullen-Humphreys
Level 11
Radcliffe
Question about the task
HashMap of 10 pairs
Java Syntax
,
Level 8
,
Lesson 3
Under discussion
What does the error I keep getting mean?
It's something to do with the .put method.
5/22/20
927
views
2
comments
0
Andrei
Level 41
Question about the task
Chicken factory
Java Core
,
Level 4
,
Lesson 6
Resolved
Welp
getDescription() apparently not implemented correctly. Why? Creating a separate object and printing getDescription works as requested.
12/2/20
623
views
3
comments
0
yuqin luo
Level 16
Singapore
Question about the task
Man and woman
Java Syntax
,
Level 5
,
Lesson 12
Under discussion
Why the constructors does not work?
public class Solution { public static void main(String[] args) { Man m = new Man("J", 10, "sdhf"); Man m2 = new Man("J", 10, "sdhf"); Woman w = new Woman("J", 10, "sdhf"); Woman w2 = new Woman("J", 10, "sdhf"); System.out.println(m.name + " " + m.age + "
12/2/20
614
views
1
comment
0
anupam jha
Level 7
Question about the task
Mercantile intentions
Java Syntax
,
Level 3
,
Lesson 12
Under discussion
for loop?
why to use for loop here? without any tutorials on it? use system.out.println rrquired number of times to get the result???
12/2/20
601
views
1
comment
0
anupam jha
Level 7
Question about the task
Hello, StarCraft!
Java Syntax
,
Level 3
,
Lesson 4
Under discussion
one doubt...
in my opinion.zerg1 is the name of the Zerg object.whats the point in having the code.zerg1.name???? or may b i dnt understand it welll.. clear my doubt.Thanks.
12/2/20
639
views
1
comment
0
Lawson
Level 29
Lagos
Question about the task
Chat (part 15)
Java Multithreading
,
Level 6
,
Lesson 15
Resolved
Pls help
How else do I call the notify method on the client object
10/7/20
625
views
1
comment
0
Show more
1
...
112
113
114
115
116
...
374
Please enable JavaScript to continue using this application.