Java - Write code to convert string to Lower Case using tenary operator

Requirements

Write code to convert string to Lower Case using tenary operator

Demo

//package com.book2s;

public class Main {
    public static void main(String[] argv) {
        String str = "book2s.com";
        System.out.println(toLowerCase(str));
    }//from  ww w . j av a 2s .  c o  m

    public static String toLowerCase(String str) {
        return str == null ? null : str.toLowerCase();
    }
}