Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- Integer stockPrice = getStockPrice();
- int i = OptionalInt.ofNullable(stockPrice).orElse(0);
- int j = stockPrice == null ? 0 : stockPrice;
- }
- static Integer getStockPrice() {
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement