Promozione
Learning
Corsi
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Tema chiaro
Aiuto con i compiti
Recensioni
Chi siamo
Inizia
Inizia a imparare
Start learning now
Tutte le domande
Fai una domanda
Java 25
Tutte le quest
Tutti i livelli
Qualsiasi stato
Domande sui compiti
In evidenza
Marco Cardia (MaisDesign)
Livello 1
Domanda sul compito
Correzione degli errori 🐛
Java 25
,
Livello 1
,
Lezione 5
Nuovo
What's wrong with my code?
package it.codegym.java.core.level01.task12; public class Solution { public static void main(String[] args) { int number = 10; //int number = 20; int uninitialized; //System.out.println(uninitialized); //String text = 123; //System.out.pri
21/12/25
5
visualizzazioni
0
commenti
0
Ginny
Livello 10
Pisa
Domanda sul compito
Closest to 10
Java Syntax
,
Livello 4
,
Lezione 4
In discussione
Can you help me find out what's wrong with my code?
Hi everybody, apparently there's something off with my code, the task resulted wrong and the hint was about checking numbers which are equally close to ten (I did). Thank you so much in advance! - Ginny package com.codegym.task.task04.task0409; /* Closest to 10 */ public class Solution { p
31/10/24
245
visualizzazioni
2
commenti
5
Pina
Livello 4
PALERMO
In discussione
I don't know how to do the exercises of CodeGym
Hi everyone. I arrived at lesson 8 of level 3. But I can't do some exercises. I asked for the solution ... and these are things I've never seen on codeGym. How come? how can i study like this? I'm confused
12/02/23
444
visualizzazioni
3
commenti
2
Pina
Livello 4
PALERMO
In discussione
why? level 2 lesson 2
com/codegym/task/task02/task0202/Solution.java:16: error: illegal start of expression public static class person { ^ why it's wrong the public class person?
27/01/23
537
visualizzazioni
4
commenti
2
Amo programmare
Livello 32
Domanda sul compito
Crossing the road blindly
Java Syntax
,
Livello 4
,
Lezione 4
In discussione
I've tested tons of numbers and I don't understand why it fails the task test
Hi, I'm hoping that somone could help me understand why my code is not passing the test. I know that it's overly complicated and that there are more elegant solutions out there, but this was the first solution that I came up with on my own. In my mind it should work but I don't know why it doesn't
04/08/22
579
visualizzazioni
2
commenti
2
Belze
Livello 7
Domanda sul compito
Task about algorithms
Java Syntax
,
Livello 5
,
Lezione 12
Risolto
boooh!!
I don't understand... it works fine but it doesn't pass!!!
17/01/23
397
visualizzazioni
2
commenti
2
Anonymous #11553958
Livello 2
Verona
Domanda sul compito
Quadrato di un numero
Java Syntax
,
Livello 1
,
Lezione 8
Nuovo
calcolo di un quadrato di numero con classi ed oggetti.
public static void main(String[] args) { //scrivi qui il tuo codice int numero = 5; System.out.println(numero); } public static int quadr(int a) { return a * a; } } Scrivi un programma che visualizza il quadrato di 5 sullo schermo.
20/08/24
208
visualizzazioni
0
commenti
2
Anonymous #11524554
Livello 28
Domanda sul compito
Refactoring (part 6)
Java Multithreading
,
Livello 5
,
Lezione 16
In discussione
What is the problem?
help!
09/09/24
214
visualizzazioni
3
commenti
0
Anonymous #11525567
Livello 13
Brescia
Domanda sul compito
Positive and negative numbers
Java Syntax
,
Livello 4
,
Lezione 7
In discussione
Why is it wrong?
I tried putting negative, positive and 0 numbers, the code seems to work but it still gives me incorrect
25/08/24
210
visualizzazioni
1
commento
0
Anonymous #11553958
Livello 2
Verona
Nuovo
Why the code is wrong?
In the print method, display the passed string 4 times. Each time, on a new line. Requisiti: • The program should display text on the screen. • The main method should not call System.out.println or System.out.print. • The print method should display the text on the screen. • The main method sh
23/08/24
213
visualizzazioni
0
commenti
0
Anonymous #11553958
Livello 2
Verona
Domanda sul compito
Quadrato di un numero
Java Syntax
,
Livello 1
,
Lezione 8
Nuovo
non capisco la soluzione dell'esercizio.
nell'esercizio viene posta l'istruzione : System.out.println(quadr(5)); mentre il resto dell'esercizio è: package it.codegym.task.task01.task0127; /* Quadrato di un numero */ public class Solution { public static void main(String[] args) { System.out.println(quadr(5)); } pub
20/08/24
188
visualizzazioni
0
commenti
0
Anonymous #11528631
Livello 16
Naples
Domanda sul compito
Number of letters
Java Syntax
,
Livello 10
,
Lezione 11
In discussione
I don't know what I wrong, the code it's work but requirement are wrong
Require • The program must read data from the keyboard 10 times. IT'S OK • The program should display text on the screen. WRONG • The displayed text should contain 26 lines. WRONG • Each line of output shou
26/06/24
283
visualizzazioni
2
commenti
0
Anonymous #11525567
Livello 13
Brescia
Domanda sul compito
Task about algorithms
Java Syntax
,
Livello 5
,
Lezione 12
Risolto
I don't know what I'm doing anymore
in my mind if a number smaller than 0 was entered, the variable b would increase, in the final case if the variable b had increased then a number smaller than or equal to 0 was inserted and therefore it did not have to print anything currently, however, I only find number 6 printed and not the ma
17/06/24
294
visualizzazioni
3
commenti
2
Anonymous #11525567
Livello 13
Brescia
Domanda sul compito
Adding
Java Syntax
,
Livello 4
,
Lezione 16
Risolto
Sum not working?
I don't know why the sum doesn't work, it only prints 14 import java.io.*; public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int numeri=0;
14/06/24
249
visualizzazioni
2
commenti
0
Gabriele
Livello 5
Padova
Domanda sul compito
Even numbers
Java Syntax
,
Livello 4
,
Lezione 13
In discussione
The text of the exercise wants the numbers from 1 to 100 "Even"...
my solution. public static void main(String[] args) throws IOException { for (int iterator = 1; iterator <= 100; iterator++) // Check if the number is even if (iterator % 2 == 0) { // Print the even number System.out.println(iter
24/05/24
220
visualizzazioni
1
commento
0
Succo
Livello 13
Domanda sul compito
Arithmetic mean
Java Syntax
,
Livello 5
,
Lezione 5
In discussione
Why sum has to be a double?
if we're calculating the mean of some integers, only the variabile "mean" should be double
20/04/24
236
visualizzazioni
1
commento
0
Succo
Livello 13
Domanda sul compito
Streets and houses
Java Syntax
,
Livello 7
,
Lezione 4
In discussione
i can't meet last requirement
Why System.out.print doesn't work with the "null" in the ternary operator?
26/04/24
208
visualizzazioni
1
commento
0
Succo
Livello 13
Domanda sul compito
Going national
Java Syntax
,
Livello 8
,
Lezione 11
In discussione
What's wrong?
It doesn't work, but I don't know why
30/04/24
224
visualizzazioni
1
commento
0
Anonymous #10841110
Livello 4
In discussione
hi, i'm italian, can someone help me? .. when i put the italian language the lessons remain in english, please help
please tell me how to fix it,or i cant learn programming
03/10/21
524
visualizzazioni
2
commenti
0
Mrrobot993
Livello 9
Domanda sul compito
Sorting three numbers
Java Syntax
,
Livello 4
,
Lezione 6
In discussione
Why not working?
I check step to step the solution also with paper but the system return error. Why?
05/10/21
501
visualizzazioni
2
commenti
0
Gino
Livello 41
Milan
Domanda sul compito
Rounding numbers
Java Core
,
Livello 8
,
Lezione 11
In discussione
the output seems correct but does not validate
some advice?
07/01/24
318
visualizzazioni
2
commenti
0
Federico Russo
Livello 20
Milano
Domanda sul compito
Ascending numbers
Java Syntax
,
Livello 6
,
Lezione 11
In discussione
what Is missing? anyone can help me? thank you!!
public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); //write your code here int[] nu = new int[5]; for(int i = 0; i < 5; i++){ nu[i] = Intege
07/11/23
499
visualizzazioni
3
commenti
0
Federico Russo
Livello 20
Milano
In discussione
what Is missing?
hello everyone! what Is missing in my code? i cant satisfy last two targets of the task. anyone can help me? thank you!!!!
07/11/23
274
visualizzazioni
0
commenti
0
Pandonio
Livello 7
Domanda sul compito
Sorting three numbers
Java Syntax
,
Livello 4
,
Lezione 6
Risolto
Descending order for integers not working
Hi all, I'm having some problems solving this. The code I wrote doesnt work because Collections.reverseOrder() doesnt like integers. If I use a String array with String values, it works only for positive numbers (obviously). How can I solve this? Here attached you can find the "Int" version. Thank y
25/08/23
676
visualizzazioni
4
commenti
0
fari
Livello 8
Domanda sul compito
Cat code won't compile
Java Syntax
,
Livello 7
,
Lezione 12
In discussione
java.lang.NumberFormatException
hello, I can't find out why my code return that error. Can someone help me please?
02/10/23
355
visualizzazioni
4
commenti
0
Pandonio
Livello 7
Domanda sul compito
Shortest or longest
Java Syntax
,
Livello 7
,
Lezione 6
Risolto
Code is working, but 3 e 4 requirements fail
Can you help me? Thanks!
06/09/23
342
visualizzazioni
4
commenti
0
Pandonio
Livello 7
Domanda sul compito
Even and odd digits
Java Syntax
,
Livello 6
,
Lezione 5
Risolto
Even/odd number variables not working
Hi all, I dont know what the mistake is... The compiler says that I didnt store the number of even/odd numbers in the eved/odd variable... Can anyone help me? The output is correct Thank you..
30/08/23
416
visualizzazioni
2
commenti
0
fari
Livello 8
Domanda sul compito
Longest string
Java Syntax
,
Livello 7
,
Lezione 6
In discussione
Can't find the error/s
The code seems work, but can't pass the tests, someone can help me please?
20/07/23
380
visualizzazioni
2
commenti
0
Matte Mor
Livello 3
Risolto
I need help about IntelliJ IDEA and CodeGym plugin
Hi, I installed the latest IntelliJ IDEA app and then the CodeGym plugin by clicking on the link written in the lesson. When I click on the "Select Task" button as said in the lesson this ban shows up: "Intellij IDEA version does not match plugin version. Download suitable plugin?". After following
26/06/23
313
visualizzazioni
1
commento
0
fari
Livello 8
Domanda sul compito
Task about algorithms
Java Syntax
,
Livello 5
,
Lezione 12
In discussione
Last requirements
Hello everybody, my code can't pass the last requirement. Someone could help me please?
22/06/23
465
visualizzazioni
2
commenti
0
Mostra altro
1
2
Please enable JavaScript to continue using this application.