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
Kalyan
Level 3
San Francisco
Question about the task
Minesweeper (Part 2/16)
Games
,
Level 0
,
Lesson 0
Under discussion
I entered all requirements but still its not working, could you please help?
package com.codegym.games.minesweeper; import com.codegym.engine.cell.*; public class MinesweeperGame extends Game { private final static int SIDE = 9; public void initialize(){ setScreenSize(9,9); } public void setScreenSize(int height, int width) { return SID
15.11.2019
1105
views
1
comment
1
Anonymous #10889854
Level 3
Волгоград
Question about the task
Minesweeper (Part 2/16)
Games
,
Level 0
,
Lesson 0
Under discussion
One cell
What the heck I am getting for this recommended reduced to minimum code: package com.codegym.games.minesweeper; import com.codegym.engine.cell.*; public class MinesweeperGame extends Game{ private static final int SIDE = 9; //private GameObject [][] gameField; @Override pu
23.01.2022
797
views
18
comments
1
David Haines
Level 13
La Crosse
Question about the task
Minesweeper (Part 2/16)
Games
,
Level 0
,
Lesson 0
Resolved
HOW DO I GET THE LAST REQUIREMENT TO VERIFY?
Below is my current code.... Last requirement is failing; The Game class's setScreenSize(int, int) method must be called with arguments (SIDE, SIDE) in the initialize() method. HOW DO I GET THE LAST REQUIREMENT TO VERIFY? CURRENT CODE package com.codegym.games.minesweeper; import com.codegym.en
24.08.2020
593
views
3
comments
1
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
Let's take your temperature
Java Syntax
,
Level 3
,
Lesson 5
Under discussion
Solution
public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double bodyTemperature = scanner.nextDouble(); //write your code here isHigh = (bodyTemperature > 37) ; isLow = (bodyTemperature < 36) ; if (isHigh) {
19.02.2023
313
views
0
comments
1
gery
Level 9
Islamabad
Question about the task
Chain letter
Java Syntax
,
Level 4
,
Lesson 13
Under discussion
error correction
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); String s = bufferedReader.readLine(); // int i; for(int i=1; i < 11; i++;) { System.out.println(s+" loves me."); }
15.09.2018
1560
views
5
comments
0
Razvan Serediuc
Level 7
Iasi
Question about the task
Minesweeper (Part 1/16)
Games
,
Level 0
,
Lesson 0
Resolved
Can't import com.codegym.engine class in InteliJ
Hi, For some reason my InteliJ project does not import the engine class I've tried solutions that were posted in the forum sections. Could you maybe provide a helping hand? thank you
26.11.2020
892
views
7
comments
1
Jill L
Level 10
China
Question about the task
Cutting down the middle
Java Syntax
,
Level 6
,
Lesson 5
Under discussion
Why "private static void" is illegal?
error: illegal start of expression private static void printArray() { ^ Since the minimum distance from interior elements to wedge must be greater than 0, I use (i>0||j>0||chars.length-i>0||chars[i].length-j>0).
26.02.2023
161
views
1
comment
0
Mike S
Level 28
Saint Louis
Question about the task
Counting words
Java Core
,
Level 9
,
Lesson 5
Under discussion
Why Version 'A' Did Not Pass, But Version 'B' (Non-Posted) Did?
I don't know what ninkampoops gave this exercise 4-stars. I just about pulled out what remains of the few hairs on my head because this one seemed so straightforward, but took an obnoxious number of attempts to pass. Mind you, there was a whole other version that I completely came up with on my own
24.02.2023
137
views
1
comment
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
The hard way...
Java Syntax
,
Level 3
,
Lesson 7
Under discussion
Solution
Scanner scanner = new Scanner(System.in); int number = scanner.nextInt(); if(number > 5) { System.out.println("The number is greater than 5"); } else if(number < 5){ System.out.println("The number is less than 5");
20.02.2023
285
views
1
comment
0
aljebra school
Level 7
New
Questions not accessible
Hello all, I just got to level 7 on my codegym doing java collections like Array and ArrrayList but I notice that all the questions in every topic can only be accessed by premium membership only. I'll like to know if that's the way the remaining part is structured or it's just for this particular
24.02.2023
159
views
0
comments
0
Gummy C
Level 11
United States of America
Question about the task
Unfilled rectangle
Java Syntax
,
Level 4
,
Lesson 0
Under discussion
Can someone pls tell me what I am doing wrong? I finally created the frame but I am getting an extra B on the side
Can someone pls tell me what I am doing wrong? I finally created the frame but I am getting an extra B on the side
27.12.2022
363
views
2
comments
1
Jill L
Level 10
China
Question about the task
Positive and negative numbers
Java Syntax
,
Level 3
,
Lesson 10
Under discussion
I don't understand what's wrong. Why" System.out.println "can't work?
int poscount=0; int negcount=0; for(int i=0;i<3;i++){ BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); if(Integer.parseInt(reader.readLine())>0) poscount++; else if(Integer.parseInt(reader.readLine())<0) negcount++; }
22.02.2023
243
views
7
comments
0
ImDevin
Level 15
Old Town
Question about the task
Fixing bugs
Java Core
,
Level 4
,
Lesson 8
Under discussion
interface or abstract class?
here, Orca class extends SeaCreture(abstract class with an abstract method) & implements CanSwim(has one method). The solution shows one method that is being overridden (@Override - CanSwim). It looks like it's the abstract method that is getting implemented, which it should. However, shouldn
10.06.2021
862
views
5
comments
0
Hafsah Jilanee
Level 10
Karachi
Question about the task
Positive and negative numbers
Java Syntax
,
Level 4
,
Lesson 7
Resolved
Please help
please help i'm getting all the correct results but it won't pass testing
02.11.2019
1100
views
2
comments
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
High accuracy
Java Syntax
,
Level 3
,
Lesson 7
New
Solution
Scanner sc = new Scanner(System.in); double a = sc.nextDouble(); double b = sc. nextDouble(); if(Math.abs(b - a) < 0.000001 ){ System.out.println("The numbers are equal"); }else{ //write your code here System.out.println("The
20.02.2023
250
views
0
comments
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
Triangle
Java Syntax
,
Level 3
,
Lesson 6
Under discussion
Solution
if((a+b)<=c || (b+c)<=a || (a+c)<=b){ System.out.println(TRIANGLE_DOES_NOT_EXIST); }else{ System.out.println(TRIANGLE_EXISTS); }
19.02.2023
248
views
1
comment
0
hendra gunawan
Level 9
tebing tinggi
Question about the task
Binary to hexadecimal converter
Java Syntax
,
Level 9
,
Lesson 2
Under discussion
please help ...
I'm stuck with the first and second requirement task....for binarynumber input ,I tried to use null as input....the result is null pointer exception....how to solve this task...some advice please
20.02.2023
168
views
2
comments
0
Kiran Kumar Alisam
Level 8
Erie
Question about the task
Rule of the triangle
Java Syntax
,
Level 4
,
Lesson 4
Under discussion
triangle isnt possible not getting executed
i have added the code when triangle is possible and added else with the conditions mentioned when triangle isnt possible .. how to get the text printed for triangle isnt possible
31.03.2022
494
views
2
comments
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
Three numbers
Java Syntax
,
Level 3
,
Lesson 5
Under discussion
Solution
public class Solution { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int number1 = scanner.nextInt(); int number2 = scanner.nextInt(); int number3 = scanner.nextInt(); if (number1 == number2) { if (number1
19.02.2023
283
views
1
comment
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
Quadrants
Java Syntax
,
Level 3
,
Lesson 6
New
Solution
Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); if(a > 0 && b > 0){ System.out.println("1"); } if(a < 0 && b > 0){ System.out.println("2");
19.02.2023
180
views
0
comments
0
Reyaz Ahmad Bhat
Level 4
Anantnag Jammu And Kashmir
Question about the task
To work or not to work? That is the question
Java Syntax
,
Level 3
,
Lesson 6
New
Solution
Scanner sc = new Scanner(System.in); int age = sc.nextInt(); if(age < 20 || age > 60){ System.out.println("You don't have to work"); }
19.02.2023
153
views
0
comments
0
NsoundarMCA
Level 18
Coimbatore
Resolved
Playing with MAX Value
int x = Integer.MAX_VALUE; long y = Long.MAX_VALUE; System.out.println(x); System.out.println(y); System.out.println(x*2); // result -2 System.out.println(y*2); // result -2 Why I'm getting -2 as result when multiplying maximum value by 2, also I'm not evening
19.02.2023
143
views
2
comments
0
EugeneEmory
Level 8
San Antonio
Question about the task
Minesweeper (Part 1/16)
Games
,
Level 0
,
Lesson 0
Under discussion
Help?
I believe I did exactly what the instruction laid out but I'm getting and unknown error?
02.03.2021
620
views
1
comment
0
NsoundarMCA
Level 18
Coimbatore
Under discussion
Index of Array
Why don't array starts with 1 ? Why java creators designed to starts with 0 rather than 1
19.02.2023
160
views
1
comment
0
Opeyemi Olaleye
Level 5
Question about the task
18+
Java Syntax
,
Level 4
,
Lesson 6
Under discussion
Coding Structure
I read the supplemental information on the scanner function and took a try at it. It seems to work but I was curious why the solution still uses things like BufferedReader when scanner is shorter. Does this have to do with proper coding structure or something? Currently the code doesn't meet the tas
14.02.2021
370
views
2
comments
0
Filip
Level 4
Karlovac
Question about the task
Repetition is the mother of all learning
Java Syntax
,
Level 2
,
Lesson 8
Resolved
Please I need your support with this task!
Please I need your support with this task!
12.11.2018
1856
views
7
comments
0
Mahendra Reddy
Level 2
CodeGym University in India
Question about the task
Uh... Happy New Year!
Java Syntax
,
Level 1
,
Lesson 6
Under discussion
java
how to coding
08.11.2022
319
views
2
comments
0
Kasia
Level 22
Zabrze
Question about the task
Minesweeper (Part 2/16)
Games
,
Level 0
,
Lesson 0
Resolved
import com.codegym.engine.cell.*; doesn't want to import in IntelJi.
Hello, if any of you found it that import com.codegym.engine.cell.*; doesn't want to import in IntelJi there is an easy solution(works for my anyway). Close intellij and remove manually folder where you have your codegym code. After restarting Intellij it will ask you to choose a folder to downloa
04.11.2020
1062
views
4
comments
2
hidden #10759343
Level 2
Question about the task
Pay raise
Java Syntax
,
Level 2
,
Lesson 2
Under discussion
Need help! Please
This code I created, but still have issue. Please, help! package com.codegym.task.task02.task0205; /* Pay raise */ public class Solution { public static void main(String[] args) { hackSalary(7000); } public static void hackSalary(int a) { int b = 1000 + 7000;
24.06.2021
442
views
5
comments
0
matemate123
Level 50
Kraków
Question about the task
Find the bugs
Java Core
,
Level 10
,
Lesson 10
Under discussion
I have one question
I had problem with this. task, I surfed a little in help section and I did it like below, but today I read whole day articles on Serialization topic, and now I rereaded this task and I commented one line in writeObject() method and one in readObject() becouse I thought that two maybe are redundant.
15.02.2023
207
views
4
comments
0
Show more
1
...
22
23
24
25
26
...
366
Please enable JavaScript to continue using this application.