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
Haridas Lakayil
Level 8
Hyderabad
Under discussion
What is wrong in my code
package com.codegym.task.task04.task0409; /* Closest to 10 */ public class Solution { public static void main(String[] args) { displayClosestToTen(8, 11); displayClosestToTen(7, 14); } public static void displayClosestToTen(int a, int b) { int c = abs(a-10);
9/9/19
1026
views
1
comment
0
krishnaprasanna doddapaneni
Level 2
Hyderabad
Question about the task
One variable is not enough
Java Syntax
,
Level 1
,
Lesson 3
Resolved
getting error in this can anyone give me carilifation
package com.codegym.task.task01.task0111; /* One variable is not enough */ public class Solution { public static void main(String[] args) { int a=20; int b=15; String name ="S"; System.out.println(a); } }
1/30/19
1792
views
5
comments
0
Theodosia J Goodman
Level 1
Wilmington
Question about the task
Contract
Java Syntax
,
Level 1
,
Lesson 6
Resolved
Here's the answer!!!
Whatever code you put it's correct. it's the website that keeps giving an error. just copy and paste: ... NOTE: it can either be System.out.printIn(""); or System.out.printIn();
3/2/19
1611
views
3
comments
2
Mega tok
Level 2
Jakarta
Question about the task
A variable on our screen
Java Syntax
,
Level 1
,
Lesson 3
Resolved
compiled but comment missing
at the code analysis states: Missing a Javadoc comment.: Solution.java, line: 9, column: 5 what is actually expected?
4/28/19
1313
views
1
comment
0
szu2
Level 2
Warsaw
Question about the task
Square of a number
Java Syntax
,
Level 1
,
Lesson 8
Archived
explanation - how do I solve this one?
I don't understand the structure(s) that we have to use here. public class Solution { public static void main(String[] args) { int a = sqr(5); System.out.println(a);//write your code here } public static int sqr(int a) { return a * a; I did this and got a righ
3/22/19
2929
views
10
comments
0
Denis
Level 22
Kharkiv
Question about the task
Displaying a stack trace
Java Core
,
Level 6
,
Lesson 3
Under discussion
LAST CONDITION
What i can do this?
6/27/19
1589
views
5
comments
0
Aman
Level 2
Chopda
Question about the task
Only 20 will do
Java Syntax
,
Level 1
,
Lesson 4
Resolved
In the main method, place plus and minus signs correctly so that the variable result is equal to 20. Signs must be placed only in the line where the variable result is declared. Do not change the order of the variables in this line. Each variable must be preceded by either a plus or minus sign.
public class Solution { public static int a = 1; public static int b = 3; public static int c = 9; public static int d = 27; public static void main(String[] args) { int result = - a - b - c - d; System.out.println(result); } }
4/28/19
2332
views
3
comments
0
Shaik Gousiya
Level 2
Mumbai
Question about the task
Amigo is very smart
Java Syntax
,
Level 0
,
Lesson 2
Resolved
How to understand errors?
8/23/19
1312
views
2
comments
0
Shaik Gousiya
Level 2
Mumbai
Question about the task
Amigo is very smart
Java Syntax
,
Level 0
,
Lesson 2
Resolved
How to overcome errors?
How to understand errors?
8/23/19
1304
views
2
comments
0
Udayan Gupta
Level 2
bangalore
Question about the task
No comments needed
Java Syntax
,
Level 0
,
Lesson 8
Resolved
i have a problem please help me out
please help me out
3/30/19
1236
views
2
comments
1
Philip T-D
Level 18
San Diego
Question about the task
Human class constructors
Java Syntax
,
Level 10
,
Lesson 11
Under discussion
I guess I am missing something. How can there be more constructors which "make sense"?
I guess I am missing something. How can there be more constructors which "make sense"?
4/23/19
1744
views
6
comments
0
Bryce Lindley
Level 9
Olympia
Question about the task
Arithmetic mean
Java Syntax
,
Level 5
,
Lesson 5
Resolved
Am I on the right track?
Any tips would be great :)
9/8/19
1240
views
2
comments
0
Aditya
Level 2
Raipur
Question about the task
Minimum of four numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
Can anyone have a look at my code?
I'm unable to pass the last test but in the test section getting correct outputs. Thanks in advance.
9/1/18
1700
views
4
comments
0
Profj
Level 20
Lagos
Question about the task
In decreasing order
Java Syntax
,
Level 7
,
Lesson 12
Resolved
Please help.
This also works perfectly, but not verifying.
6/8/19
1768
views
4
comments
0
past cham
Level 6
Delhi
Question about the task
Crossing the road blindly
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
how to solve
how to solve
3/22/19
1634
views
3
comments
0
hidden #10484120
Level 13
Question about the task
Crossing the road blindly
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
Can't satisfy the last tree requirements, don't know what's wrong
Can't figure out what's wrong with my code. Please help and give a hint! Thanks
9/4/19
1388
views
5
comments
0
Laurence Chadwell
Level 4
San Antonio
Question about the task
Number of days in the year
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
I feel like I have it down correctly but it still not accepting my leap year statement
package com.codegym.task.task04.task0414; /* Number of days in the year */ import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); if(x %
8/20/19
1728
views
2
comments
0
Henk
Level 19
Pretoria
Question about the task
Countdown at the races
Java Core
,
Level 6
,
Lesson 10
Resolved
Does ANYONE understand the requirements ?
Coding this is easy, but coding what you THINK they want is VERY difficult. (1) How can your code run longer than 4 seconds if you had to put a sleep of 3 and a half seconds in the main program part ? (2) If you interrupt it, from the main program, it has already completed, because it only sleeps a
5/28/19
1990
views
6
comments
0
Mykhailo Kuvshynov
Level 8
Dnipro
Question about the task
R or L
Java Syntax
,
Level 7
,
Lesson 9
Resolved
Help
First of all I don't understand sense of lines 23-25. And also why wouldn't it work?
9/6/19
1515
views
3
comments
0
Ewerton
Level 30
Belo Horizonte
Question about the task
Iterating through a file tree
Java Collections
,
Level 1
,
Lesson 2
Archived
"Close output stream..."
Bug or am I distracted?
7/7/19
1509
views
4
comments
3
Martin Evtimov
Level 22
Chicago
Question about the task
Parenthetical brainteaser
Java Syntax
,
Level 3
,
Lesson 4
Resolved
Help
I tried to look deeper but this is way too much. In my opinion, this task doesn't teach you anything. It's only time consuming.... package com.codegym.task.task03.task0306; /* Parenthetical brainteaser */ public class Solution { public static void main(String[] args) { System.out.p
8/19/18
3707
views
29
comments
2
Łukasz Szajek
Level 6
Poznan
Question about the task
Minimum of four numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
does not go through verification
Hello, It runs', displays proper results, but doesn't verify :/ Please help
8/23/19
1158
views
3
comments
0
smile
Level 7
Tainan
Question about the task
Minimum of three numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
What's wrong with my min method?
I run the code, and it shows: 1 -3 3 5 It seems correct, but I still failed. Why?
5/7/19
1751
views
4
comments
0
asyraf
Level 3
Kuala Lumpur
Question about the task
Minimum of two numbers
Java Syntax
,
Level 2
,
Lesson 8
Resolved
doesn't understand
I cannot seem understand what happen on my code and does i make mistake? why the output do not come out
4/30/19
1989
views
9
comments
0
Jay
Level 17
Washington
Question about the task
Different methods for different types
Java Core
,
Level 5
,
Lesson 12
Under discussion
I'm stuck on this one
I'd appreciate your help. Thanks.
9/6/19
1449
views
2
comments
0
Payal Agarwal
Level 17
Bucharest
Question about the task
Template pattern
Java Core
,
Level 5
,
Lesson 12
Under discussion
I am not getting this
I am not getting this
9/6/19
1516
views
2
comments
0
Mike McKenna
Level 25
Wilmington
Question about the task
Even to the moon!
Java Syntax
,
Level 2
,
Lesson 8
Resolved
What about newtons ?
Hi, I found 2 ways to get the right answer . When I go to verify failure occurs because I don't mention newtons any where . As I read thru questions / comments . I find no mention of newtons . Thanks Mike McKenna When i changed moonWeight to lunarWeight .task verified . even with uneven math
4/23/19
2361
views
3
comments
0
Cristian
Level 16
Bucharest
Question about the task
Getters and setters for the Person class
Java Syntax
,
Level 5
,
Lesson 5
Under discussion
Nothing is validated. Why?
package com.codegym.task.task05.task0508; /* Getters and setters for the Person class */ public class Person { String name; int age; char sex; public String getName() { return name; } public void setName() { this.name = name; } publi
9/4/19
1353
views
3
comments
0
Nicolas Huet
Level 41
Provins
Question about the task
Wait and see
Java Multithreading
,
Level 5
,
Lesson 9
Resolved
Hello, I must be in the wrong direction, can someone give me a hint?
Since I have not even one validation, I think I'm leaning in the wrong direction. Can someone give me a hint? Thank you.
9/2/19
1351
views
2
comments
0
Wojtek
Level 23
Solec-Zdroj
Question about the task
Identical words in a list
Java Syntax
,
Level 10
,
Lesson 11
Resolved
What is wrong with my code?
Output is: red 1 polska 2 asd 3 dream 3 gol 3 them 1 rivaldo 2 yeah 2 team 3
1/31/19
1855
views
5
comments
0
Show more
1
...
283
284
285
286
287
...
374
Please enable JavaScript to continue using this application.