Typescript Compare Two Strings Java