Check out example codes for "how to split properly if condition". It will help you in understanding the concepts better.

Code Example 1

public static void main1(String[] args) {

    if (args != null
        && args.length == 2
        && !args[0].equals(args[1])
        ) {
            System.out.println("Args are ok");
    }
}

Learn ReactJs, React Native from akashmittal.com