PopOS is created from Ubuntu, so the configuration for Java environment can be follow the same way. We need only install the new version from the JDK and automatically it will be set as default. However, if you like rollback to previously version that was installed before, you can use the last step to do that.
sudo apt update