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
hidden #10523504
Level 4
Question about the task
Price of apples
Java Syntax
,
Level 4
,
Lesson 1
Under discussion
Why does Apple.applePrice = applePrice + applePrice; equal to 200 but Apple.applePrice + applePrice equals 150?
Struggling to get this..... Why does "Apple.applePrice = applePrice + applePrice" equal to 200 but "Apple.applePrice + applePrice" equals 150?
9/10/19
2496
views
8
comments
0
Douglas
Level 4
Kano
Question about the task
Declare variables
Java Syntax
,
Level 0
,
Lesson 4
Resolved
Declaring Integer as age
String name = ("name"); int age = ("age"); String city = ("city"); How can I declare the integer as age correctly?
3/15/19
4637
views
5
comments
0
123 123
Level 1
Question about the task
Snake (Part 1/20)
Games
,
Level 0
,
Lesson 1
Under discussion
How do I change the language?
???
8/1/24
215
views
1
comment
0
AG09Mex
Level 28
Question about the task
John Johnson
Java Core
,
Level 9
,
Lesson 11
Under discussion
Seems to be working?
Not really sure why it is not validating. Whenever I test my code it seems like it does what it is supposed to. I'm not sure what I'm missing, any help would be nice.
8/14/24
205
views
1
comment
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
Debug everything under the sun
Java Core
,
Level 6
,
Lesson 13
Resolved
Question about UncaughtExceptionHandler
Well, I googled some theoretical info about UncaughtExceptionHandler and even completed the task successfully... As all it required was to add one line:). But I still don't think I really understood what I did. I understand it's an interface for dealing with uncaught exceptions... But we've lived wi
8/7/24
219
views
4
comments
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
The early bird gets the worm
Java Core
,
Level 6
,
Lesson 13
Resolved
Why is the 1st requirement not met?
I've written this code, it meets all the requirements except the very first one: The run method must run until the thread is terminated (!IsInterrupted). I thought the following while-loop in the run() method was serving that purpose: public void run() { while (!isInterrupted()) {..
7/31/24
253
views
5
comments
0
Zach
Level 22
Fort Collins
Question about the task
Stopwatch
Java Core
,
Level 6
,
Lesson 7
Under discussion
Whats wrong with this code.
private void doStep() throws InterruptedException { stepNumber++; // write your code here if (owner.speed == 2) { Thread.sleep(500); } else if (owner.speed == 4) { Thread.sl
4/1/21
581
views
2
comments
0
Anonymous #11549069
Level 10
Katowice
Under discussion
a question about subscribtion mode
Hello i want to try codegym in java learning for 2 months .. - subscribtion to see all what you offer , is that good or you just make it nice at begining and in later levels its not fully made ? what exactly give me this subscription - the offer i see , that is : https://codegym.cc/sale "Special d
8/3/24
207
views
0
comments
0
preshgerman3
Level 14
Under discussion
how to implement games
how to implement games
8/2/24
193
views
0
comments
0
Павел Артеменко
Level 41
Krasnodar
Question about the task
Chat (part 9)
Java Multithreading
,
Level 6
,
Lesson 15
Resolved
What's wrong with notifyUsers()?
private void notifyUsers(Connection connection, String userName) throws IOException { Message message = new Message(MessageType.USER_ADDED, "User, called " + userName + " has been added."); for (Map.Entry connectionEntry : connectionMap.entrySet()) { if (!connectionEntry.getKey().equals
5/11/19
2530
views
7
comments
2
Anonymous #11533978
Level 26
Bilbao
Question about the task
GCD
Java Core
,
Level 4
,
Lesson 8
Resolved
what is wrong? It gives the correct result and yet does not meet the criteria
According to the revision, the code is not meeting the task requeriments. The result I get with the inputs 24 and 42 is correct (6) but somehow it does not pass the test. What is wrong? public class Solution { public static void main(String[] args) throws Exception { BufferedReader irak
8/1/24
231
views
3
comments
0
yuvraj bhatti
Level 1
Mumbai
Under discussion
car parking barrier
make a barrier in car parking that lifts up when car is nearer and down when car is not nearer
7/31/24
187
views
0
comments
0
Dipankar Sinha
Level 22
United States of America
Under discussion
how to disable subscription
By 16th september 2024 i will complete my annual subscription. How to disable subscription post the date.
7/31/24
179
views
0
comments
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
File in a static block
Java Core
,
Level 5
,
Lesson 12
Resolved
How to make it really read from a real file
I've solved this task, or at least it has been validated by CodeGym as correct. I still have a question, though. The code is supposed to read lines from a real file, the path to which we need to assign as a value to the public static String field called FILE_NAME (of the file called Statics). How
7/18/24
272
views
9
comments
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
Binary to hexadecimal converter
Java Syntax
,
Level 10
,
Lesson 2
Resolved
One of the methods in this code is still not accepted by the validator. What am I doing wrong?
I kind of put aside this task some time ago and moved on. But today I decided to catch up with some unresolved tasks and got back to this one. The code seems to work fine in general, but there is still something wrong with the toBinary(String value) method, even though it produces and outputs the ex
7/19/24
248
views
3
comments
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
Binary to hexadecimal converter
Java Syntax
,
Level 10
,
Lesson 2
Resolved
I wonder if I could've made it shorter
I've just written the longest code in my short professional life:) It produces the expected output but I'm wondering if I could make it any simpler. The second issue is that after verification the website says, "Be sure that the toHex(String) method returns an empty string if it receives an empty s
4/18/24
350
views
9
comments
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
Face control
Java Syntax
,
Level 16
,
Lesson 2
Resolved
Why not this way?
I've read the correct solution and see that we are expected to display the data from the file our program reads in the form of characters, not strings. I just don't understand why it cannot be done in the string form, as the requirement is technically to "display everything except periods, commas, a
5/31/24
255
views
4
comments
0
Mm m
Level 1
Question about the task
From student to skilled slave
Java Core
,
Level 1
,
Lesson 11
Under discussion
digoprime number
WAP to input a four digit number and check whether it is a digorime number or not ( a number is said to be digoPrime when its only contain Prime digit)
7/16/24
180
views
0
comments
0
Bob
Level 10
United States of America
Question about the task
Two iPhones
Java Syntax
,
Level 10
,
Lesson 4
Under discussion
What am I missing?
When I run the program, it says true. if I change one of the parameters for one of the Iphones, I get false, yet I am not meeting the second criteria?
7/14/24
209
views
5
comments
0
Naman Gamer
Level 1
Bangalore
Under discussion
css
vss
7/12/24
190
views
0
comments
0
Evgeniia Shabaeva
Level 42
Budapest
Question about the task
Reading a file
Java Core
,
Level 3
,
Lesson 11
Resolved
Why close the BufferedReader if I'm not using it?
I wrote this code without using the BufferedReader (as I actually wasn't told to do so). But, according to the validator, I still have to close it.... So, should I use it instead of the Scanner or the InputStream? I'm slightly puzzled;)
7/2/24
286
views
7
comments
0
X SS
Level 25
Question about the task
Binary converter
Java Syntax
,
Level 10
,
Lesson 2
Under discussion
Codegym's answer
How come we can assign String binaryNumber an integer?
7/3/24
206
views
2
comments
0
Pratusha Mandal
Level 1
Under discussion
how to code
how can I code in this app by clicking what?
7/1/24
202
views
1
comment
0
X SS
Level 25
Question about the task
Octal converter
Java Syntax
,
Level 10
,
Lesson 2
Under discussion
End of file while parsing
error:reached end of file while parsing. How can i solve this?
7/2/24
212
views
1
comment
0
Anonymous #11492773
Level 31
Germany
Question about the task
Shall we play?
Java Core
,
Level 6
,
Lesson 13
Resolved
task is not compiled on the server
Hey guys. i try to validate my solution but for some reason it keeps telling me task is not compiled on the server. any tips on what i am doing wrong is appreciated.
6/25/24
217
views
2
comments
0
Benjamin Joseph Lentine
Level 8
Songwon
Question about the task
Price of apples
Java Syntax
,
Level 3
,
Lesson 4
Under discussion
How does += get the right answer?
So, I get what it does in functionality, but I can't seem to understand how it gets the right answer here. So here is how I'm understanding this code: applePrice = 0. apple.addprice increases applePrice to 50. apple2.addPrice increases it by 100 to 150. It seems to me like the math should already
6/23/24
292
views
4
comments
1
Anonymous #11475584
Level 11
Hayward
Question about the task
Snake (Part 19/20)
Games
,
Level 0
,
Lesson 1
Under discussion
help
why is this part of my code causing problems and saying illegal start of expression for public void move (Apple apple) ? im really lost (im referring to the commented part in the Snake class inside the setDirection method)
6/23/24
201
views
1
comment
0
Ahmed
Level 23
Amsterdam
Question about the task
Array of string lists
Java Syntax
,
Level 10
,
Lesson 11
Resolved
It should work?
Anyone can help here? I think this code should work? Or i'm missing something?
5/21/19
2854
views
4
comments
12
lobotomic
Level 4
Prague
Question about the task
Sorting three numbers
Java Syntax
,
Level 4
,
Lesson 6
Resolved
"The task does not compile on the server"
Hi guys, I tried some List approach for this task and when validating I get an error "The task does not compile on the server". Is there some issue in Intelijj settings or the validator just does not except such solution and is not ready for that? So with if/else solution I gonna be ok to proceed to
6/15/24
222
views
2
comments
0
X SS
Level 25
Question about the task
Triangular array
Java Syntax
,
Level 6
,
Lesson 6
Under discussion
IndexOutOfBounds but why
What's difference between my solution and codegym's. Mine gives error?
6/20/24
223
views
1
comment
0
Show more
1
...
7
8
9
10
11
...
374
Please enable JavaScript to continue using this application.