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
hacks patel
Level 20
Ahmedabad
Question about the task
Initializing cats
Java Syntax
,
Level 5
,
Lesson 7
Resolved
everything looks fine .. but I don't know what wrong with my code?
everything looks fine .. but I don't know what wrong with my code?
12/18/18
2573
views
2
comments
0
Bishal Sharma
Level 3
Mumbai
Question about the task
Minimum of three numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
what is wrong in this
if(a>b|| b>c){ return c; } if(c>b||b>a){ return a; } else{ return b; } }
11/28/18
1341
views
4
comments
0
Ashutosh Sharma
Level 8
Delhi
Question about the task
Kind Emma and the summer holidays
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
How to assign the map value in the map variable in the main method.
package com.codegym.task.task08.task0816; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; /* Kind Emma and the summer holidays */ public class Solution { public static HashMap createMap() throws ParseException { D
3/24/19
1840
views
3
comments
0
fady shaker
Level 7
Stuttgart
Question about the task
Adding
Java Syntax
,
Level 4
,
Lesson 16
Under discussion
help pleas
can someone tell me what is the problem the code works well
3/20/19
1588
views
2
comments
0
Rusu Adelina
Level 17
Iasi
Question about the task
Sorting three numbers
Java Syntax
,
Level 4
,
Lesson 6
Resolved
Why I get !!!!!The program should display the numbers in descending order----If you enter the numbers 2, 1, 2, then the program should display: 2 2 1.!!!!!! error?
public static void main(String[] args) throws Exception { Scanner ad = new Scanner(System.in); int num1 = ad.nextInt(); int num2 = ad.nextInt(); int num3 = ad.nextInt(); if (num1>num2 && num2>num3) {System.out.println(num1 + " " + num2 +
3/24/19
2239
views
2
comments
0
kenny
Level 11
Vancouver
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Under discussion
Why can't I declare the lists the way I declared it?
Thanks!
3/21/19
1274
views
2
comments
0
Bazsó Benjámin
Level 20
Szombathely
Question about the task
R or L
Java Syntax
,
Level 7
,
Lesson 9
Under discussion
whats wrong here
i dont understand why the output is giving me: love lyre love
3/24/19
1335
views
2
comments
0
Bazsó Benjámin
Level 20
Szombathely
Question about the task
Streets and houses
Java Syntax
,
Level 7
,
Lesson 4
Archived
program runs fine but wont verify
i cant see where is the problem
3/23/19
1452
views
2
comments
0
Bazsó Benjámin
Level 20
Szombathely
Question about the task
Words in reverse
Java Syntax
,
Level 7
,
Lesson 9
Resolved
should verify i think
am i doing something wrong or is the verification system glitched?
3/24/19
1773
views
2
comments
0
Tanish
Level 5
Mumbai
Question about the task
Positive and negative numbers
Java Syntax
,
Level 4
,
Lesson 7
Under discussion
Please can someone rectify whats wrong?
import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws Exception { //write your code here Scanner sc = new Scanner(System.in); int[] a = new int[3]; a[0] = sc.nextInt(); a[1] = sc.nextInt();
3/23/19
1547
views
1
comment
0
Bazsó Benjámin
Level 20
Szombathely
Question about the task
Shortest or longest
Java Syntax
,
Level 7
,
Lesson 6
Resolved
whats wrong with my code?
i cant figure it out
3/24/19
1728
views
2
comments
0
szu2
Level 2
Warsaw
Question about the task
As simple as 2+2
Java Syntax
,
Level 1
,
Lesson 8
Under discussion
Explanation needed
I do not understand how I can use sum function to add 2+2. Could anyone explain that step by step? For instance package com.codegym.task.task01.task0128; /* As simple as 2+2 public class Solution { public static void main(String[] args) { int a = 2; int b = 2; int c
3/22/19
1863
views
6
comments
0
Hashirama
Level 26
Port-Harcourt
Question about the task
Let's make the code do something useful!
Java Syntax
,
Level 9
,
Lesson 11
Resolved
Help Please
How do I handle this one?
1/29/19
2379
views
7
comments
1
szu2
Level 2
Warsaw
Question about the task
Only 20 will do
Java Syntax
,
Level 1
,
Lesson 4
Resolved
fails to verify
When I run this code without verification I get 20 but the system gives me 2 errors 1) Each of the variables (a, b, c, and d) in the line where the variable result is declared must be preceded by either a plus or minus sign. (BUT each of the variables is preceeded by a sign! 2) The plus and minus s
3/22/19
1637
views
2
comments
1
Ryan
Level 14
Ashburn
Question about the task
Sorting even numbers from a file
Java Core
,
Level 3
,
Lesson 11
Archived
Console won't stop reading
The problem for me is that when I enter the file name and hit enter the console just continues to read until I stop the program. I cannot find anything in my code that would make this happen as I only user the reader object once. I'm stumped.
3/24/19
2527
views
1
comment
0
Don Boody
Level 8
Victor
Question about the task
Three numbers
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
the indexes you should return are "1, 2, or 3," not "0, 1, or 2" as you might expect
Spent a lot of time struggling to figure out how my code could be wrong before realizing that the solution did not want a zero-based index. Now that I realize it, the example does make it clear (in 466 example, the solution is "1"), but I did not read carefully enough and wasted at least a half hour
2/15/19
1637
views
3
comments
0
Angeget
Level 22
Potsdam
Question about the task
Sorting three numbers
Java Syntax
,
Level 4
,
Lesson 6
Resolved
The code is working, i just need an improvement please
if (number1 >= number2 && number1 >= number3) { //num1 if (number2 >= number3) System.out.println(number1 + " " + number2 + " " + number3); else System.out.println(number1 + " " + number3 + " " + number2);
12/25/18
2586
views
14
comments
0
Bazsó Benjámin
Level 20
Szombathely
Question about the task
Ascending numbers
Java Syntax
,
Level 6
,
Lesson 11
Under discussion
dont see the problem here
when i try to run the program with example input 3,2,15,6,17 the output is [0, 0, 2, 6, 17], why is that? doesnt matter which numbers i enter there is always 2 numbers that get converted to 0
3/23/19
1417
views
2
comments
0
Alexey
Level 7
Chernihiv
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Resolved
1st Requirement not working
Maybe im not undestend task. Help me please.
3/23/19
1398
views
2
comments
0
AJITA SINGH
Level 2
Vishakhapatnam
Question about the task
Our first converter!
Java Syntax
,
Level 2
,
Lesson 2
Resolved
what is wrong with my code.I cannot meet one of the conditons that is 3. The convertCelsiusToFahrenheit method should not display anything.
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) { double
3/14/19
2126
views
3
comments
0
ARIJIT SAHA
Level 3
Kolkata
Question about the task
Display the square of a number
Java Syntax
,
Level 1
,
Lesson 3
Resolved
Here is my code shown below. Don't know where is the problem? I can't pass the fourth condition. Kindly help me.
package com.codegym.task.task01.task0140; /* Display the square of a number */ public class Solution { public static int number = 25; public static void main(String[] args) { //write your code here int number = 4; System.out.println(number*number); } }
8/15/18
1849
views
5
comments
0
Joy Majumdar
Level 16
Kolkata
Question about the task
Minimum of N numbers
Java Syntax
,
Level 8
,
Lesson 11
Resolved
You run the program and it is just taking & taking keepon taking input
Glad to hear my fault
3/22/19
1503
views
4
comments
0
Ashutosh Sharma
Level 8
Delhi
Question about the task
R or L
Java Syntax
,
Level 7
,
Lesson 9
Under discussion
Why no output showing in this code?? I have used for each loop for traversing the list instead of for loop.
public class Solution { public static void main(String[] args) throws Exception { ArrayList list = new ArrayList(); list.add("rose"); // 0 list.add("love"); // 1 list.add("lyre"); // 2 list = fix(list); for (String s : list) { System
3/22/19
1423
views
2
comments
0
Emanuele Gurini
Level 18
Porto Recanati
Question about the task
A name is a name
Java Syntax
,
Level 4
,
Lesson 16
Resolved
Who would like to help me to find the typo error?
Hey guys, i think that more eyes works better than two, then, someone would like help me to find typo error in my code? I am a very quiet person but now i feel that i could punch my plush teddy bear. Help my teddy bear, please.
3/22/19
1962
views
4
comments
0
Bill Wu
Level 29
Wellington
Question about the task
Prices 2
Java Core
,
Level 8
,
Lesson 11
Resolved
Can't be verified
Similar to the other task, am I misunderstanding the requirements? The example shows that each parameter ends with only one " " if its length is shorter than 8, 30, 8, 4 characters.
3/3/19
1625
views
3
comments
0
szu2
Level 2
Warsaw
Under discussion
Code meaning - Introducing the program
Could someone please explain to me the code below? I'm sorry, I know it is a very basic level but I'm not sure I get it. PACKAGE NAME package com.futujava.lesson2; import java.io.IOExeption; /** * User: General * Date: 12/21/12 * Time: 11:59 */ CLASS NAME public class Task1 {
3/22/19
1603
views
2
comments
0
Darko Jakimovski
Level 18
Kriva Palanka
Question about the task
R or L
Java Syntax
,
Level 7
,
Lesson 9
Resolved
I can't get the order of the output right. I really don't get it
The output that I get is as follows: love lyre love And it won't confirm my task because of that
1/21/19
2230
views
4
comments
0
Bill Wu
Level 29
Wellington
Question about the task
Number algorithms
Java Core
,
Level 10
,
Lesson 10
Resolved
Cannot pass the verification
I tried two methods to limit the time to 10 seconds, but after a lot of googling I can't find anyway to limit the memory use. I tested in the main, either way works for the time control, but the verification still times out. Any suggestions please? Thanks in advance.
3/14/19
2081
views
5
comments
0
Bill Wu
Level 29
Wellington
Question about the task
Prices
Java Core
,
Level 8
,
Lesson 11
Resolved
help please, can't verify
I tested it and the result seems fine, and I even deleted the last " " (space), but still can't be verified...
3/3/19
1634
views
3
comments
0
Alex Balandinos
Level 18
Lusaka
Question about the task
We don't need repeats
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Removal of firstname failing need help
3/13/19
1518
views
2
comments
0
Show more
1
...
338
339
340
341
342
...
374
Please enable JavaScript to continue using this application.