CodeGym
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
  • Ramilya
    Level 20
    SPb
    Question about the task Countdown at the races
    Java Core, Level 6, Lesson 10
    Resolved
    Task1617Help, please. What's wrong in my code? Output in Idea is correct. Input: numSeconds = 3. Output: 3 2 1 Go! Input: numSeconds = 4. Output: 4 3 2 1 Interrupted!
    • 02.05.2019
    • 1626views
    • 2comments
    1
  • Jason
    Level 16
    Question about the task Minesweeper (Part 7/16)
    Games, Level 0, Lesson 0
    Resolved
    Can't pass openTile conditionsAll works as expected, i tired passing both x,y and y,x and both work perfectly (as the game should) but i cannot pass the two openTile conditions. Any help is appreciated. I also tried leaving everything x,y except gameField[y][x].isMine and still no luck. private void openTile(int y, int
    • 17.11.2019
    • 1491views
    • 4comments
    1
  • Emre Erkaslan
    Level 0
    Istanbul
    Question about the task 2048 (Part 6/18)
    Games, Level 0, Lesson 2
    Under discussion
    Please help meI examined and applied every question but it doesn't still work. (Second to last condition)
    • 08.11.2020
    • 822views
    • 1comment
    1
  • ddi
    Level 18
    Dortmund
    Question about the task Minesweeper (Part 13/16)
    Games, Level 0, Lesson 0
    Under discussion
    Please explain it to me! Why do i have this error : error: 'void' type not allowed here for(GameObject neighbor : getNeighbors(gameField[y][x])) { Line 172. I dont get its a for loop... why the error?
    • 01.10.2019
    • 1162views
    • 1comment
    1
  • Brett Politzer
    Level 5
    Mililani
    Question about the task Minesweeper (Part 6/16)
    Games, Level 0, Lesson 0
    Under discussion
    Where is getNeighbors() defined?According to the conditions: "you now have the getNeighbors() method, which has one GameObject (cell) parameter." Accroding to the requirements: The countMineNeighbors() method should use the getNeighbors(GameObject gameObject) method. I don't see the getNeighbors method defined. Are we
    • 28.08.2019
    • 2123views
    • 2comments
    3
  • Oleksii Osypenko
    Level 8
    Warsaw
    Question about the task Minesweeper (Part 9/16)
    Games, Level 0, Lesson 0
    Resolved
    Hello, how should i solve last requirements. Please help. Hello, how should i solve last requirements. Please help. Thanks
    • 07.11.2019
    • 1766views
    • 2comments
    2
  • matemate123
    Level 50
    Kraków
    Question about the task AutoCloseable and try-with-resources
    Java Multithreading, Level 1, Lesson 10
    Resolved
    Maybe it's lame question public class Solution { public static void main(String[] args) { DBConnectionManager dbConnectionManager = new DBConnectionManager(); try (FakeConnection fakeConnection = dbConnectionManager.getFakeConnection()) { System.out.println("Entering body of try block.");
    • 04.03.2023
    • 393views
    • 3comments
    0
  • Kosmonaut45
    Level 3
    Question about the task Minesweeper (Part 6/16)
    Games, Level 0, Lesson 0
    Under discussion
    What am I doing wrong?Hey, I was trying to count the neighbours around the mine, but I cannot get it to work. Could someone help me?
    • 09.10.2019
    • 1708views
    • 1comment
    2
  • remote87
    Level 18
    Sofia
    Question about the task Minesweeper (Part 6/16)
    Games, Level 0, Lesson 0
    Under discussion
    I don't getI have made my code as simple to follow as possible and in my head everything works fine and in the code looks OK, but still I get: - "The countMineNeighbors() method should, for each non-mined cell in the gameField matrix, count the number of adjacent mined cells and assign this value to the countM
    • 03.04.2021
    • 958views
    • 4comments
    1
  • GCPix
    Level 15
    Glasgow
    Question about the task Minesweeper (Part 6/16)
    Games, Level 0, Lesson 0
    Resolved
    Where am I going wrong?I am thinking I might have misunderstood requirements somewhere. I keep failing on the CountMyNeighbors method. In itself, it is fairly straight forward. Loop through each array object, if the object isn't mined get the surrounding objects. Because objects will not have a neighbour at each point
    • 15.07.2019
    • 2375views
    • 6comments
    3
  • satish
    Level 15
    kadapa
    Question about the task Minesweeper (Part 6/16)
    Games, Level 0, Lesson 0
    Under discussion
    getNeighbour() is weather a inbuilt methodif not a inbuilt method how should to write
    • 12.07.2019
    • 1284views
    • 2comments
    1
  • Jon Hjerting
    Level 1
    Oslo
    Question about the task Minesweeper (Part 13/16)
    Games, Level 0, Lesson 0
    Under discussion
    The openTile(int, int) method must decrease the countClosedTiles field by 1 if the gameField element's isOpen flag is set.My method seems to work ok when I play the game. I am not sure why it is not passing. private void openTile(int x, int y) { // 3. The openTile(int, int) method must not do anything if the game is stopped (isGameStopped == true). if (isGameStopped) { return;
    • 15.08.2019
    • 1883views
    • 5comments
    1
  • Catherine
    Level 23
    London
    Question about the task Release resources
    Java Multithreading, Level 1, Lesson 10
    Under discussion
    Please Help. I am very frustrated.I have tried it on my own. I have read the article posted in another help query and done what I think that article directed (see code attached). And yet, I am getting the following error: com/codegym/task/task21/task2111/Solution.java:29: error: expected try (stmt = connection.createStatem
    • 29.07.2020
    • 618views
    • 4comments
    0
  • Mein Kaif
    Level 7
    Resolved
    please point out the errorI tested this code in all possible variants on other IDEs, it works flawlessly. the result meets the requirements of the task. but why is it not accepted? please! it breaks my brain. he works!!!
    • 04.03.2023
    • 228views
    • 2comments
    0
  • hendra gunawan
    Level 9
    tebing tinggi
    Question about the task URL validation
    Java Syntax, Level 9, Lesson 5
    Under discussion
    please help...what's wrong with my code?
    • 04.03.2023
    • 247views
    • 1comment
    0
  • h laxman
    Level 6
    Bangalore
    Question about the task Minesweeper (Part 5/16)
    Games, Level 0, Lesson 0
    Under discussion
    Not able to proceedI'm not able to understand why the last condition is not getting satisfied
    • 26.04.2020
    • 1056views
    • 2comments
    1
  • Benjamin Spoiden
    Level 20
    Liège
    Question about the task Minesweeper (Part 5/16)
    Games, Level 0, Lesson 0
    Resolved
    Completely stuckI absolutely don't understand why the last conditon isn't met. Can anyone help me ? Thanks.
    • 27.08.2019
    • 2370views
    • 8comments
    2
  • Romuald Ladwein
    Level 1
    France
    Question about the task Space Invaders (Part 3/34)
    Games, Level 0, Lesson 6
    Under discussion
    Why GameObject class in package gameobjects doesn't work package com.codegym.games.gameobjects; public class GameObject { public double x; public double y; public GameObject(double x, double y) { this.x = x; this.y = y; } }
    • 16.06.2022
    • 599views
    • 1comment
    1
  • matemate123
    Level 50
    Kraków
    Question about the task Deep cloning of a map
    Java Multithreading, Level 1, Lesson 8
    Resolved
    I validate but don't get everything I thingConsole output is promising because I got "false" on equals two Solution objects, but "true" on hashcode. I understand it that hashcode is the same because it was copied, and equals return "false" because I got two different objects now. But why console result is: SOLUTION : com.codegym.task.task21
    • 01.03.2023
    • 312views
    • 2comments
    0
  • remote87
    Level 18
    Sofia
    Question about the task Nice weather
    Java Core, Level 3, Lesson 11
    Resolved
    This really pisses me offf....Ok, I am stupid, I am new to this, I get that....but what the heck?! According to this article ( that I read over and over again ) https://codegym.cc/groups/posts/104-the-difference-between-abstract-classes-and-interfaces " An interface only describes behavior. It has no state." Also: But if we tr
    • 26.01.2021
    • 506views
    • 5comments
    1
  • 8iy6ui
    Level 1
    Gurgaon
    New
    gta6 /_uwushy2ehhdhdhrvydiebryehegegwghsudu sjsjjsbehh5hjjrjejydydjdjdydgd ejjdhhdhdbe. ehsgeve d6yeheywiwuehdjdjjsjsjsjshs0ui3kxhgxx safdarjungsssn+3($(($ 278#8$$)$!$isidishgsysysysysy s7eueuueueueueueuue73737e7e7e77e7e7eue77eue7ksksksbsvgzgdysjekjrhdurie suisisjdheheusuejhshdhsjueieiieieieueieieyhe
    • 01.03.2023
    • 204views
    • 0comments
    0
  • 8iy6ui
    Level 1
    Gurgaon
    New
    273366666 )widow +jueet3. 1soham. 2747484. pc. 1 gB. )u uddouhdjs){iiwss$=€212677. vvsui. ta6. mmobile )/ueieeeewuyys swkkkkllhuwa hwsjeeee jeebbbed usui eek e open 🕐 ok6. you. ueuehe jrurirj ejkr. ekje rjkr ke t rken trnvrvr he. jeh e e57 dekh u 68okmb. bvffe5767in e57 i. dr 7k d
    • 01.03.2023
    • 218views
    • 0comments
    0
  • matemate123
    Level 50
    Kraków
    Question about the task Word search
    Java Core, Level 10, Lesson 10
    Resolved
    Tell me am I thinking right?Now I have method that return one word when I search for it , e.g System.out.println(detectAllWords(wordSearch, "same")); I get back only one directories, but I have three words "same" in table now. It's the problem? Have I good understanding, that I need return every word from crossword? If you
    • 25.02.2023
    • 556views
    • 8comments
    0
  • Raisa Toscano
    Level 22
    Tepic
    Question about the task All that moves
    Java Core, Level 3, Lesson 2
    Resolved
    what am I missing...interface CanMove { double speed(); } interface CanFly extends CanMove { CanFly speed(CanFly fly); }
    • 09.01.2019
    • 2150views
    • 3comments
    1
  • 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
    • 1365views
    • 1comment
    1
  • Anonymous #10889854
    Level 3
    Волгоград
    Question about the task Minesweeper (Part 2/16)
    Games, Level 0, Lesson 0
    Under discussion
    One cellWhat 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
    • 1191views
    • 18comments
    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
    • 770views
    • 3comments
    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
    • 436views
    • 0comments
    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
    • 1748views
    • 5comments
    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 InteliJHi, 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
    • 1139views
    • 7comments
    1
  • 1
  • ...
  • 28
  • 29
  • 30
  • 31
  • 32
  • ...
  • 372
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2025 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2025 CodeGym