Promotion
CodeGym University
Learning
Course
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
Alex Tor
Level 31
Question about the task
URL validation
Java Syntax
,
Level 10
,
Lesson 5
Resolved
checkDomainExtension(String) - isn't being validated.
Hi guys, The written code gives the following output: URL address: https://javarush.us, network protocol - https, domain extension - us URL address: https://google.com, network protocol - https, domain extension - com URL address: http://wikipedia.org, network protocol - http, domain extension - o
10.08.2022
304
views
2
comments
0
Clark Roberts
Level 0
Question about the task
Amigo is very smart
Java Syntax
,
Level 0
,
Lesson 2
Under discussion
really struggling with the task
is anyone else really struggling? I am unable to complete the task and do not understand what where should be entered.
16.10.2019
1038
views
2
comments
0
Денис Чистяков
Level 30
Poland
Question about the task
Prices 2
Java Core
,
Level 8
,
Lesson 11
Under discussion
What am i doing wrong? Can't figure it out, please help
What am i doing wrong? Can't figure it out, please help
13.11.2022
171
views
2
comments
0
Satya Vath
Level 31
Vijayawada
Question about the task
Don't mix beer with cola
Java Core
,
Level 3
,
Lesson 2
Resolved
Please Help
package com.codegym.task.task13.task1303; /* Don't mix beer with cola */ public class Solution { public static void main(String[] args) throws Exception { print(new Beer()); print(new Cola()); } private static void print(Drink drink) { System.out.println(dri
07.04.2019
1081
views
4
comments
1
Tata
Level 16
Hisar, Haryana
Question about the task
Beer. Part 2. The recovery.
Java Core
,
Level 3
,
Lesson 2
Resolved
Can we make objects of interface???
Of course we can't then what it is :-- Drink beer = new AlcoholicBeer();
28.07.2020
389
views
6
comments
1
Gellert Varga
Level 23
Szekesfehervar
Question about the task
The unapproachable cat
Java Core
,
Level 1
,
Lesson 8
Under discussion
Private setter method?...
Does it have any sense to make a setter method private (in a real program)? Nobody will be able to change that private variables, because of: the private setter method also uncallable. (In this task we had to make the setter method private.)
02.01.2021
766
views
4
comments
1
Ashish RajAnand
Level 13
Bhilai
Question about the task
Don't forget to encapsulate
Java Core
,
Level 1
,
Lesson 8
Resolved
How reference will passed?
public class Cat{ private String name; public void setName(String name){ this.name=name;//set name by passing current reference of object . } public String getName() return name;//return name or return this.name //which will correct ? } Both will work but I don't understand In return name; how
09.05.2020
469
views
1
comment
1
priyantha s
Level 8
Question about the task
Unfilled rectangle
Java Syntax
,
Level 4
,
Lesson 3
Under discussion
can you give some clues
give me some clues
13.11.2022
572
views
2
comments
0
hidden #11160211
Level 6
Question about the task
Reverse
Java Syntax
,
Level 5
,
Lesson 2
Under discussion
I'm stuck. I think the logic of my code is wrong. Give me some help! Thank you so much!
Scanner console = new Scanner(System.in); int N = console.nextInt(); int[] array = new int[N]; for (int i = 0; i < N; i++) { array[i] = console.nextInt(); if (N > 0) { for (i = N; i >= 0; i--) {
14.11.2022
470
views
1
comment
0
Alex Tor
Level 31
Question about the task
Buggy initializeIdAndName
Java Core
,
Level 3
,
Lesson 2
Under discussion
What's wrong with the overridden method DBObject initializeIdAndName(long id, String name) ?
Hi All, According to Judge - two of the four requirements don't seem to have been passed, which is invalid. As you can see, the overridden method both returns a User and initialize the User's fields name and id Any chance of finding out why this code hasn't been validated? Thank you in advance!
12.11.2022
427
views
1
comment
0
hidden #11160211
Level 6
Question about the task
Summation
Java Syntax
,
Level 4
,
Lesson 0
Under discussion
Hello! I can't understand what is wrong with my code! Thanks a lot!
package en.codegym.task.pro.task04.task0403; import java.util.Scanner; /* Summation */ public class Solution { public static void main(String[] args) { //write your code here Scanner console = new Scanner(System.in); boolean isExit = false; int sum = 0;
03.11.2022
535
views
10
comments
0
matemate123
Level 50
Kraków
Question about the task
Memory defragmentation
Java Syntax
,
Level 11
,
Lesson 6
Under discussion
I need final touch
I checked on debugging mode that value array have only 4 object on end method but when program went back on main method, after executeDefragmentation(), still printing full array with null.
10.11.2022
305
views
7
comments
0
Kudi
Level 2
New
App creation
How to build an app from scratch
11.11.2022
174
views
0
comments
0
Evilpanda H.
Level 10
Under discussion
declare a variable inside a loop
In the below program, the variable "int x" is declared inside the "while" loop. Will the program generate many variables of int x while the loop is executed over and over again? Should I declare the int x outside the loop? like, int x = ""; then in the loop x = console.nextInt(); Scanner console
11.11.2022
286
views
4
comments
0
ImDevin
Level 15
Old Town
Resolved
IntelliJ question
Hi all, When I work on a task in Intellij, I want to run it to what result it produces, before submitting to the checker, but when I click on the "run" button, nothing happens. The window on the bottom(Intellij) only shows this: "C:\Program Files\Java\jdk1.8.0_281\bin\j
23.04.2021
574
views
8
comments
0
heliD
Level 21
United Kingdom
Question about the task
Correct order
Java Syntax
,
Level 6
,
Lesson 1
Under discussion
Correct answer but doesn't pass?
Hiya, My solution runs and prints correct answer to the console but why it doesn't pass?
08.11.2022
224
views
3
comments
0
Anonymous #11121253
Level 2
New
🥲😭
want to learn but not understanding. how to use? 🤯 i am confused 😵😐
10.11.2022
254
views
0
comments
0
Franco Paul
Level 1
Dar es salaam
Under discussion
What is wrong in this code??
package com.codegym.task.task01.task0101; public class Solution { public class void main(String[] args) { System.out.println("I think being a programmer is cool"); } }
08.11.2022
189
views
1
comment
0
Vinay Bansode
Level 1
Pune
Under discussion
Can I Run Advanced Java's Program
Can I Run Advanced Java's Program On this Application
08.11.2022
123
views
0
comments
0
Sourav Kumar Rana
Level 9
Delhi
Question about the task
Price of apples
Java Syntax
,
Level 4
,
Lesson 1
Under discussion
here is the solution worked for me
package com.codegym.task.task04.task0402; /* Price of apples */ public class Solution { public static void main(String[] args) { Apple apple = new Apple(); apple.addPrice(50); Apple apple2 = new Apple(); apple2.addPrice(100); System.out.println("The cos
14.01.2019
2272
views
12
comments
0
matemate123
Level 50
Kraków
Question about the task
StringTokenizer
Java Syntax
,
Level 10
,
Lesson 6
Resolved
What's wrong?
I have read that in this exersise may be bug. I don't know what to do, because everything in this program do it's funkction.
06.11.2022
215
views
2
comments
0
Vadim “迪姆哥”
Level 35
Question about the task
Buy an elephant
Java Syntax
,
Level 15
,
Lesson 3
Resolved
My code are identical to correct solution, but validator didnt let it pass
WHY?
01.11.2022
286
views
3
comments
0
Vadim “迪姆哥”
Level 35
Question about the task
Filling an array
Java Syntax
,
Level 6
,
Lesson 8
Under discussion
code meets requirenment of task
So, according to Console output, if array size is 20(even), it fills with : [10,10,10,10,10,10,10,10,10,10,13,13,13,13,13,13,13,13,13,13] Then if array size is 21(odd), it fills as [10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,13,13,13,13,13] According to console output, my code met the requirem
12.10.2022
391
views
10
comments
0
GioGTelian
Level 10
Question about the task
Minimum of N numbers
Java Syntax
,
Level 6
,
Lesson 3
Resolved
why it doesnt work?
i need to know i spent too much time on this!!
26.10.2022
279
views
1
comment
2
Anonymous #11149234
Level 6
United States of America
Question about the task
Comparing strings by reference
Java Syntax
,
Level 3
,
Lesson 9
Under discussion
why not equals?
why not equals() ? i tried so manny times thinking I was supposed to use equals to compare?? please
27.10.2022
298
views
2
comments
0
Weichen Ouyang
Level 25
San Jose
Question about the task
Cache based on SoftReference
Java Collections
,
Level 4
,
Lesson 6
Under discussion
Please help me out: I don't understand the requirement for the put method
I can get it right for the put method of the SoftCache. I will really appreciate anyone could offer some help.
26.09.2019
1117
views
5
comments
0
Deepanshu Pathak
Level 3
Jakarta
Question about the task
How to take over the world
Java Syntax
,
Level 2
,
Lesson 8
Under discussion
how to input the scanner class
how to input the scanner class
18.10.2022
269
views
2
comments
0
Dawn( #11020889)
Level 37
Toronto
Question about the task
Shall we play?
Java Core
,
Level 6
,
Lesson 13
Under discussion
what's wrong with my code? Please help!
Why the code can not fit the third require? Someone give a hint? Thanks a lot!
29.10.2022
393
views
1
comment
0
Amber Singh Rathour Pandey
Level 8
Delhi
Question about the task
To the top of the list
Java Syntax
,
Level 7
,
Lesson 6
Under discussion
General query about adding things in ArrayList
If I do this, for(int i = 0; i < 10; i++) { list.add(0, r.readLine()); } So, list is an ArrayList, I thought it will add the element on the first position, then, when It will add the second time at the same place, the previous element should've disappeared, but it didn't. Instead, it kept
27.10.2022
244
views
0
comments
0
Amber Singh Rathour Pandey
Level 8
Delhi
Question about the task
Longest string
Java Syntax
,
Level 7
,
Lesson 6
Under discussion
Regarding an loop syntax in the solution
For syntax is weird. for(string element : strings) { ... }
25.10.2022
224
views
3
comments
0
Show more
1
...
29
30
31
32
33
...
366
Please enable JavaScript to continue using this application.