Conversation
| import java.util.Objects; | ||
| import java.util.stream.Collectors; | ||
|
|
||
| public class XmlConverter { |
There was a problem hiding this comment.
Nice idea and implementation!
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new CustomFileReader().run1(); |
There was a problem hiding this comment.
Nice usage of abstractions!
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new CustomRegexMatcher().run(); |
There was a problem hiding this comment.
Good, real-life regex example with optional borders. Well-done!
| public class Main { | ||
|
|
||
| public static void main(String[] args) { | ||
| new PowerOfNumber().run(); |
| } | ||
|
|
||
| private BigInteger pow(BigInteger a, BigInteger b) { | ||
| if (b.compareTo(BigInteger.valueOf(0)) == 0) return BigInteger.valueOf(1); |
There was a problem hiding this comment.
| if (b.compareTo(BigInteger.valueOf(0)) == 0) return BigInteger.valueOf(1); | |
| if (b.compareTo(BigInteger.valueOf(0)) == 0) { | |
| return BigInteger.valueOf(1); | |
| } |
Opt
There was a problem hiding this comment.
Also, assigning new data to the same variables is usually a code smell
| private void runMapProblemsCollision() { | ||
| } |
There was a problem hiding this comment.
No examples for collision?
| @Override | ||
| public int hashCode() { | ||
| return new Random().nextInt(10); | ||
| // return new Random().nextInt(); | ||
| } |
There was a problem hiding this comment.
The problem with mutable keys is that you can't find the value if you change the key. In your case, it's just hashcode doesn't follow contracts. Even with properly-written hashcode mutable objects as keys can be lost in case of changing (and rehashing as the result)
|
|
||
| import static homework_7.model.Sex.*; | ||
|
|
||
| public class Main { |
|
|
||
| import static course_project.services.GameService.*; | ||
|
|
||
| public class Game extends BaseClazz { |
There was a problem hiding this comment.
It's quite difficult to put ships manually, especially because the field does not refresh
There was a problem hiding this comment.
I got it, you refresh after the type of ships was placed. Smart move
There was a problem hiding this comment.
Also time between turns is quite long, could you please reduce sleep time?
|
HW and Cource Project approved! Although you could do better on course project, it is working now and I didn't reproduce the last bug and didn't see any new. If you have time, please refactor and ping me. If not, it's fine as is |
…warning of re-hit


No description provided.