Questions tagged [java]
Java (not to be confused with JavaScript) is a class-based, object-oriented, strongly typed, reflective language and run-time environment (JRE). Java programs are compiled to bytecode and run in a virtual machine (JVM) enabling a "write once, run anywhere" (WORA) methodology.
10,868
questions
3
votes
1
answer
106
views
Java: Benchmark findFirst() and findAny() methods on non-parallel streams
I would like to know how representative the following benchmark is? Can we infer from it that findFirst is much slower than ...
3
votes
2
answers
799
views
A chess engine in Java: generating white pawn moves - take II
Intro
This post continues the A chess engine in Java: generating white pawn moves.
I was advised to choose between efficiency and type safety. Since this is my first attempt at a chess engine, I have ...
-2
votes
0
answers
28
views
Spring boot application doesn't fire controller [closed]
Good morning.
I'm struggling with the following Spring Boot webapp, built with Spring Initializr.
The server responds 404 when i invoce getAllCategories service.
I'd tried to change also the project'...
8
votes
4
answers
2k
views
A chess engine in Java: generating white pawn moves
(This post has now a continuation.)
I decided to embark on implementing my own chess engine. The first (and perhaps most demanding) part of that endeavour is generating child states out of a given ...
2
votes
2
answers
60
views
A thread-safe performant Money Transfer API in Java
This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
-3
votes
0
answers
43
views
DNA to RNA transcribe [closed]
Deoxyribonucleic acid, DNA is the primary information storage molecule in biological systems. It is composed of four nucleic acid bases Guanine ('G'), Cytosine ('C'), Adenine ('A'), and Thymine ('T').
...
3
votes
1
answer
87
views
Auth0 Credentials Manager in Android app
I am building an Android app that communicates with a REST API using Retrofit2 and uses Auth0 for authentication. The Android app needs to store access token from Auth0 and use it to authorize its ...
1
vote
0
answers
50
views
Principal Variation Search (PVS) for playing Connect Four in Java
This time, I have an implementation of PVS (Principal Variation Search) algorithm for playing the game of Connect Four.
The repository holding the above .java file ...
3
votes
2
answers
103
views
First tic tac toe game. want to see if valid or needs improvement
Just finished my first java class that taught me all the way up to oop and abstract classes. Decided to start some projects over the summer. Started with tic tac toe since it sounded fairly easy to do....
6
votes
3
answers
621
views
Simple calendar in Java
I set out trying to use as many methods as possible in order to use them in future projects, but I don't feel like I did a great job in regards to that.
Also i wanted to use as many basic java ...
1
vote
0
answers
38
views
Negamax with Alpha-beta pruning for playing Connect Four in Java
I have this repository.
My main concern this time is my implementation of the Negamax algorithm with alpha-beta pruning:
...
4
votes
1
answer
87
views
Multithreaded Alpha-beta pruning for playing Connect Four in Java
Intro
(The entire repository is in GitHub.)
This time, I have parallelized the famous Alpha-beta pruning algorithm. The idea is that the parallel algorithm descends in a game tree (at least) 2 levels ...
4
votes
1
answer
87
views
ConnectFourFX.java - A Java FX GUI app for playing Connect Four against AI
GitHub
The entire project relies here (ConnectFourFX.java) and is dependent on Connect4.java.
Code
com.github.coderodde.game.connect4.ConnectFourBoard.java:
...
0
votes
0
answers
29
views
Flat serialization of single-value Java records used as strong types with Gson v2.11.0
Introduction
I am currently developing a REST client in Java v21 and got the foundation basically working.
In my project the Immutables and Gson library are currently used. Both libraries integrate ...
4
votes
3
answers
270
views
Connect4.java - The Connect Four game against an Alpha-beta pruning -based AI bot
I have this GitHub repository. It implements the command-line version of the Connect Four game. The AI bot is implemented via Alpha-beta pruning.
Code
...