Here you can find the source of areEquals(final String s1, final String s2)
Parameter | Description |
---|---|
s1 | string |
s2 | string |
public static boolean areEquals(final String s1, final String s2)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w . j ava 2 s. co m * Compare two String to see if they are equals (both null is ok). * * @param s1 string * @param s2 string * @return if two String are equals */ public static boolean areEquals(final String s1, final String s2) { return s1 == null ? s2 == null : s1.equals(s2); } }