HTML – Character encoding and character references

HTML – Character encoding and character references

Character encoding is a set if mappings between byte in the computer and characters. A character can be a letter, a number or any symbol. With HTML you should use UTF-8 encoding. Here is how you declare the encoding for one page: Read more here. Character references are a set of characters that the browsers use to display a character or symbol. This happens because HTML reserves some characters and you cannot use them to print on the screen. Character references can be written using a name or a number.…

HTML – Character encoding and character references Read More

Java – String and Character class

Java – String and Character class

String class represents character string. For example: String name = “Kronos”; Some String methods: String.concat(string) – Concatenates the specified string to the end of this string. String.subString(begin,end) – Returns a string that is a substring of this string. The substring begins at the specified begin and extends to the character at index end – 1 String.startsWith(string) – Tests if this string starts with the specified prefix. String.length() – Returns the length of this string. String.indexOf(char) – Returns the index within this string of the first occurrence of the specified character. String.toLowerCase() – Converts…

Java – String and Character class Read More