java break out of if code example Example: java while loop break while (true) { .... if (obj == null) { break; } .... }