Rust Minimum Function In Java