Converting characters or Strings to their Unicode values in Java. Once this is done the Unicode values of the characters can be added, subtracted, multiplied or divided. This is useful when wanting to establish whether a String login is valid or not. See output below.
Consider the following String and the related program output below. Here the first four character’s Unicode values have been added together. Example: If their added values exceed 200 then the code is valid.
String serialNumber = “ZA8-4579-PQ”;
