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
All quests
All levels
Any status
Questions about tasks
Hot
hidden #10412202
Level 8
Question about the task
Shortest or longest
Java Syntax
,
Level 7
,
Lesson 6
Under discussion
Code runs correctly, test fails
package com.codegym.task.task07.task0712; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; /* Shortest or longest */ public class Solution { public static void main(String[] args) throws Exception { //write you
25.12.2018
1479
views
10
comments
0
Paul
Level 24
Vienna
Question about the task
Our first converter!
Java Syntax
,
Level 2
,
Lesson 2
Resolved
saving a value in a double
I don't really get the idea, why saving the result of this calculation in a double doesn't give me the right result: double a = 9/5 ; shouldn't it be the same as : double a = 9/5.0 ; Still I get totally different results and I am wondering why.
15.10.2019
877
views
2
comments
0
Timothy Strong
Level 4
San Diego
Question about the task
Minimum of three numbers
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
I do know what I am doing wrong?
package com.codegym.task.task02.task0216; /* Minimum of three numbers */ public class Solution { public static int min(int a, int b, int c) { int min; if (a <= b && a <= c);{ min = a;} if (b <= c && b <= a);{
13.10.2019
1226
views
3
comments
0
Vahan
Level 41
Tbilisi
Question about the task
Table
Java Core
,
Level 8
,
Lesson 8
Resolved
How to display the number of elements in the list? None of the solutions (in the comments) were verified! Are there any more?
public class Solution { public class TableInterfaceWrapper implements TableInterface { TableInterface rows; public TableInterfaceWrapper (TableInterface rows) { this.rows = rows; } public void setModel(List rows) { // int sizeOfList = row
21.10.2019
945
views
2
comments
0
hidden #10481736
Level 4
Question about the task
Crossing the road blindly
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
Trying to use a Math function to solve
I get the following error when I use the floor function: com/codegym/task/task04/task0416/Solution.java:17: error: incompatible types: possible lossy conversion from double to int int a = Math.floor(t); I've tried making t a double and a float, and adjusting from input.nextDouble to input.
15.10.2019
1294
views
2
comments
0
Patrick freeman
Level 14
Buffalo
Question about the task
One large array and two small ones
Java Syntax
,
Level 7
,
Lesson 4
Under discussion
Not understanding how to copy arrays into other arrays
I'm struggling to understand the final condition "The program must copy one half of the large array into the first small array, copy the second half into the second array, and then display that array on the screen.". I relied heavily on another question to get this far, and I just don't understand w
19.10.2019
1129
views
1
comment
0
Azamat Aminov
Level 41
Tashkent
Question about the task
Console-based piggy bank
Java Syntax
,
Level 5
,
Lesson 12
Resolved
Please help me I couldn't find mistake?
import java.io.InputStreamReader; import java.util.Scanner; /* Console-based piggy bank */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String name = reader.read
05.04.2019
1774
views
2
comments
0
Ivan
Level 22
Nope
Question about the task
Changing functionality
Java Syntax
,
Level 7
,
Lesson 12
Resolved
Printing hurdle
Guys, what am i doing wrong?
18.10.2019
1323
views
5
comments
0
Sargam
Level 3
Aligarh
Question about the task
Our first converter!
Java Syntax
,
Level 2
,
Lesson 2
Resolved
can't identify my mistake
can't find the error in the formula used i.e. TF=(9/5*celsius)+32
15.10.2018
2070
views
12
comments
0
Mathis Longino
Level 16
Hanover
Question about the task
Playing Javarella
Java Syntax
,
Level 7
,
Lesson 9
Resolved
What am I doing wrong with the initialization?
Hey guys and girls, I have no idea where I am wrong with my solution. The code works perfectly fine. I tried to declare and initialize the lists seperately (e.g. ArrayList<Integer> list = new ArrayList<Integer>();) followed by value-input through the methods in the following lines. In t
19.10.2019
1051
views
2
comments
0
Jimmy Phan
Level 7
Atlanta
Question about the task
Crossing the road blindly
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
Why are all 3 of my requirements marked off?
I know there might be a shorter way to do it but I've decided to do it the longer way lol. All input numbers, 2.5, 3, 4, 5, 60 were inputted and it worked. anything outside of the condition < 0 or > 60 does not work. Any advise? Thanks.
21.10.2019
1005
views
1
comment
0
James Mackenzie
Level 7
Victoria
Question about the task
R or L
Java Syntax
,
Level 7
,
Lesson 9
Resolved
Logic error? unable to duplicate?
the list.add(list.get(i)); Section i feel like it adds it to the end of the list however when it returns it on completion it outputs as if it hasn't been added. what am i missing.
17.10.2019
1262
views
2
comments
0
Anthony Chalk
Level 30
London
Question about the task
Notepad for new ideas
Java Syntax
,
Level 6
,
Lesson 11
Under discussion
I'm so confused
I'm not too sure what's required here and how this is supposed to work, please help. Thank you
20.10.2019
1055
views
3
comments
0
Michael
Level 10
Dresden
Question about the task
Do we have a pair?
Java Syntax
,
Level 4
,
Lesson 4
Resolved
Tasks resolved, but code does not validate
Tasks resolved, but code does not validate. Why? Any idea?
13.10.2019
1217
views
5
comments
2
kapil
Level 12
delhi
Question about the task
Distance between two points
Java Syntax
,
Level 6
,
Lesson 8
Resolved
problem while verifying...
problem.....getDistance method should return distance between points. i have checked the code running in intellij perfectly fine.
27.10.2018
2303
views
4
comments
0
abhijith arjun
Level 12
DeKalb
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Archived
3 and 4th conditions are not satisfying
plz help
12.08.2019
965
views
1
comment
0
Meera
Level 5
Bantval
Under discussion
Question about IntelliJ Idea Community framework
I had downloaded the Community framework version 2018.2.2. However, when I open the application, I get the below error. Failed to load JVM DLL\bin\server\jvm.dll If you already have a 32-bit JDK installed, define a JAVA_Home variable in Computer> System Properties > System Settings > Envi
10.09.2019
1504
views
1
comment
0
Tasnuba Anika
Level 3
New York City
Question about the task
Where does a Person come from?
Java Syntax
,
Level 2
,
Lesson 2
Under discussion
How to write objects
In the Person class, declare the following variables: String name, int age, int weight, int money. In the main method, create a Person object and store a reference to it in the variable person. Hint: Use the following construct to create a Person object and assign a reference to that object to the
19.10.2019
2173
views
1
comment
0
Anonymous #10011987
Level 16
Question about the task
Census
Java Syntax
,
Level 8
,
Lesson 8
Under discussion
Unable to get correct answer for HashMap
I have no idea based on the code I have written, why it is giving an error for the third condition. I have specified 10 entries as (last name, first name) pair. Thanks in advance.
18.10.2019
1201
views
4
comments
0
Patrick freeman
Level 14
Buffalo
Question about the task
String array in reverse order
Java Syntax
,
Level 7
,
Lesson 4
Resolved
Failing requirement to "display 10 strings, each on a new line"
Hello, I keep failing the condition "The program should display 10 strings, each on a new line.". In IntelliJ, it does display 10 strings, and this is the final output if my inputs are string1,string2, etc.: Peter Bishop Walter Bishop string8 string7 string6 string5 string4 string3 string2 string1
18.10.2019
1210
views
2
comments
0
Revathy S
Level 4
trivandrum
Question about the task
Plan to conquer the world
Java Syntax
,
Level 3
,
Lesson 8
Under discussion
pls help
import java.io.*; import java.util.*;
18.10.2019
1092
views
2
comments
0
Anonymous #10011987
Level 16
Question about the task
Longest sequence
Java Syntax
,
Level 8
,
Lesson 6
Under discussion
Unable to get correct answer for Longest Sequence program using ArrayList
I am not able to get a correct solution for my current code. I am using the easiest possible solution for the given problem, using an ArrayList. Thanks in advance. Error: It is telling me to check if my code works for numbers > 127, or not. But I have already set the data type as Integer. It's r
17.10.2019
1146
views
5
comments
0
Will Rosenberg
Level 9
Glendale
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Archived
What is Wrong?
It meets the conditions. What is wrong?
26.11.2018
1600
views
4
comments
1
Dusernajder
Level 20
Budapest
Question about the task
Prices
Java Core
,
Level 8
,
Lesson 11
Under discussion
It works for me
I am not sure why are those requirements not validating.
13.10.2019
1184
views
1
comment
0
Carlos Cortázar
Level 17
Madrid
Under discussion
executing linux commands from java
I am trying to execute a linux command from my java class using the method exec() from the Runtime class in this way: ////////////////////////////// public static String xxUtilInfoFile (String sPath , String sFileName) throws Exception { Runtime r = null; Process p = nu
18.10.2019
802
views
1
comment
0
John
Level 27
Washington DC
Question about the task
Five winners
Java Syntax
,
Level 8
,
Lesson 11
Resolved
Why is my code not correct? I tried this in eclipse and it outputs correctly.
Why is my code not correct? I tried this in eclipse and it outputs correctly.
03.10.2019
1300
views
2
comments
0
vladimir.plamadeala@endava.com
Level 10
Chisinau
Question about the task
Census
Java Syntax
,
Level 8
,
Lesson 8
Resolved
Why is two last conditions do not verify? In IntelliJ seems to work fine.
package com.codegym.task.task08.task0815; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; /* Census */ public class Solution { public static HashMap createMap() { HashMap map = new HashMap<>(); map.put("Moldova", "Ian"); map
17.10.2019
1389
views
3
comments
0
Han
Level 24
Question about the task
Adding a file to an archive
Java Collections
,
Level 1
,
Lesson 6
Resolved
The task doesn't compile on server (but it does on my machine)
So when I try to submit this code I get the following error: Error in com/codegym/task/task31/task3105/Solution.java on line 34 cannot find symbol symbol: method readAllBytes() location: variable zipIs of type java.util.zip.ZipInputStream Anyone an idea what I'm doing wrong?
17.10.2019
2645
views
4
comments
0
tony
Level 20
Nis
Question about the task
Faster together? We'll see :)
Java Core
,
Level 7
,
Lesson 2
Resolved
need help
Any idea of how to solve the third requirement?
05.03.2019
1313
views
3
comments
0
Anthony Chalk
Level 30
London
Question about the task
Even and odd digits
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
I can't find the problem
I'm really not sure what's wrong with the code.
17.10.2019
1004
views
2
comments
0
Show more
1
...
266
267
268
269
270
...
371
Please enable JavaScript to continue using this application.