Hello.
These are the most coding problems during technical interviews, as I experienced it myself.
It's the convenience of the Codespaces online! Simply create a Codespace, you don't need to install anything, just simply run using Bash.
Also starting Java 11, you can now run it even without compiling !
cd src
then
java [NameOfTheFile].java
this is the interface of the online Codespaces
enjoy !
This is based on :
https://www.journaldev.com/370/java-programming-interview-questions
I don't know about the specific license the author used but I'm still including his link for his copyright.
When you copy my work, include the author's link and my MIT license for my modifications.