{"id":93,"date":"2019-01-18T16:44:39","date_gmt":"2019-01-18T16:44:39","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/java\/?p=93"},"modified":"2020-08-06T09:53:34","modified_gmt":"2020-08-06T09:53:34","slug":"15-java-the-character-class","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/","title":{"rendered":"Java &#8211; The Character Class"},"content":{"rendered":"<p>You probably know the difference between primitive types and wrapper classes. I recommend a brief review of this under <a href=\"https:\/\/www.kindsonthegenius.com\/java\/java-basic-data-types\/\">Java Data Types<\/a>. You also know about boxing and unboxing as well.<\/p>\n<p>&nbsp;<\/p>\n<p>Furthermore we have considered <a href=\"https:\/\/www.kindsonthegenius.com\/java\/java-the-numbers-class\/\">The Numbers Class<\/a>. This time we would look at the Characters class.<\/p>\n<ol>\n<li><a href=\"#t1\">Introduction to the Character Class<\/a><\/li>\n<li><a href=\"#t2\">Escape Sequences<\/a><\/li>\n<li><a href=\"#t3\">Character Methods<\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t1\">1. Introduction to the Character Class<\/strong><\/h4>\n<p>A character is a single character enclosed in single quote. For instance, the code below declares and assigns two characters.<\/p>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">   <span style=\"color: #333399; font-weight: bold;\">char<\/span> char1 <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0044dd;\">'A'<\/span><span style=\"color: #333333;\">;<\/span>\r\n   <span style=\"color: #333399; font-weight: bold;\">char<\/span> char2 <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0044dd;\">'B'<\/span><span style=\"color: #333333;\">;<\/span>\r\n   \r\n   <span style=\"color: #888888;\">\/\/unicode character for &amp;<\/span>\r\n   <span style=\"color: #333399; font-weight: bold;\">char<\/span> uniChar <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0044dd;\">'\\u0026'<\/span><span style=\"color: #333333;\">;<\/span> \r\n   \r\n   <span style=\"color: #888888;\">\/\/a character array<\/span>\r\n   <span style=\"color: #333399; font-weight: bold;\">char<\/span> charArray<span style=\"color: #333333;\">[]<\/span> <span style=\"color: #333333;\">=<\/span> <span style=\"color: #333333;\">{<\/span><span style=\"color: #0044dd;\">'J'<\/span><span style=\"color: #333333;\">,<\/span> <span style=\"color: #0044dd;\">'A'<\/span><span style=\"color: #333333;\">,<\/span> <span style=\"color: #0044dd;\">'V'<\/span><span style=\"color: #333333;\">,<\/span> <span style=\"color: #0044dd;\">'A'<\/span><span style=\"color: #333333;\">};<\/span> \r\n<\/pre>\n<p>Listing 1.0: char primitive types<\/p>\n<p>&nbsp;<\/p>\n<p>All the characters we have declared in Listing 1.0 are primitive type. However, we may need to use the corresponding object type. So the equivalent wrapper class for this is the Character class.<\/p>\n<p>You can create a new character object by calling the constructor of this class. This you use with the new keyword. An example is given below.<\/p>\n<p>&nbsp;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">     Character ch1 <span style=\"color: #333333;\">=<\/span> <span style=\"color: #008800; font-weight: bold;\">new<\/span> Character<span style=\"color: #333333;\">(<\/span><span style=\"color: #0044dd;\">'J'<\/span><span style=\"color: #333333;\">);<\/span>   \r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>The code creates a new character object, &#8216;J&#8217;. You recall that this is example of boxing. That is, we take a primitive type &#8216;J&#8217; and box it into a Character object.<\/p>\n<p>Furthermore, we have various useful methods the Character class provides to help us manage Character objects. Find the list in Table 1.0<\/p>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t2\">2. Escape Sequences<\/strong><\/h4>\n<p>We also use Characters are used in escape sequences. Now, escape sequence is a combination of a backslash (\\) and a character. Hence, you may need it at certain times.<\/p>\n<p>For example, you use the escape sequence \\n represents a new line. You probably have used this to add a new line to the end of a string.<\/p>\n<p>You can find a list of escape in Table 1.0.<\/p>\n<p>&nbsp;<\/p>\n<table class=\"table table-bordered\" align=\"center\">\n<tbody>\n<tr style=\"background-color: #f7f6f3;\">\n<th>Escape Sequence<\/th>\n<th>Brief Description<\/th>\n<\/tr>\n<tr>\n<td>\\n<\/td>\n<td>Adds a newline in the text at the point it appears.<\/td>\n<\/tr>\n<tr>\n<td>\\b<\/td>\n<td>Ads a backspace in the text at the point it appears.<\/td>\n<\/tr>\n<tr>\n<td>\\t<\/td>\n<td>Adds a tab in the text at the point it appears.<\/td>\n<\/tr>\n<tr>\n<td>\\r<\/td>\n<td>Adds a carriage return in the text at the point it appears.<\/td>\n<\/tr>\n<tr>\n<td>\\f<\/td>\n<td>Adds a form feed in the text at this the it appears.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">\\&#8217;<\/td>\n<td>Adds a single quote character in the text at this the it appears.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">\\&#8221;<\/td>\n<td>Ads a double quote character in the text at the point it appears.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">\\\\<\/td>\n<td>Adds a backslash character in the text at this the it appears.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Table 1.0: List of Escape sequences<\/p>\n<p>&nbsp;<\/p>\n<p>So let&#8217;s write a program that makes use of some of the escape sequence. I therefore recommend you try it. Also try out others not in the program. See Listing 1.1.<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Tester<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\r\n   <span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">static<\/span> <span style=\"color: #333399; font-weight: bold;\">void<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span><span style=\"color: #333333;\">(<\/span>String args<span style=\"color: #333333;\">[])<\/span> <span style=\"color: #333333;\">{<\/span>\r\n        <span style=\"color: #888888;\">\/\/notice the tab<\/span>\r\n\tSystem<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span><span style=\"background-color: #fff0f0;\">\"Java\\tTutorials\"<\/span><span style=\"color: #333333;\">);<\/span>\r\n\t   \r\n\t<span style=\"color: #888888;\">\/\/Notice the quotes<\/span>\r\n\tSystem<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span><span style=\"background-color: #fff0f0;\">\"Your are learning \\\"Java\\\" \"<\/span><span style=\"color: #333333;\">);<\/span>\r\n\t   \r\n\t<span style=\"color: #888888;\">\/\/Notice the carriage return(same as enter key)<\/span>\r\n\tSystem<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span><span style=\"background-color: #fff0f0;\">\"Good\\rJob\"<\/span><span style=\"color: #333333;\">);<\/span>\t   \r\n   <span style=\"color: #333333;\">}<\/span>    \r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<p>Listing 1.1: Use of Escape Sequences<\/p>\n<p>&nbsp;<\/p>\n<p>If you run the code in Listing 1.1, you will have the following output:<br \/>\n<!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\">Java\tTutorials\r\nYour are learning <span style=\"background-color: #fff0f0;\">\"Java\"<\/span> \r\nGood\r\nJob\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h4><strong id=\"t3\">3. Character Methods<\/strong><\/h4>\n<p>Similar to the Numbers wrapper class, the Character wrapper class provide us a number of useful methods. I therefore provide a list of these methods in Table 1.1.<\/p>\n<p>&nbsp;<\/p>\n<table class=\"table table-bordered\" align=\"center\">\n<tbody>\n<tr style=\"background-color: #f7f6f3;\">\n<th>SN<\/th>\n<th>Method and\u00a0 Description<\/th>\n<\/tr>\n<tr>\n<td class=\"ts\">1<\/td>\n<td><strong>isLetter()<\/strong><\/p>\n<p>Checks if the given char value is a letter.<\/p>\n<p>If yes return true, else return false.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">2<\/td>\n<td><strong>isDigit()<\/strong><\/p>\n<p>Checks if the given char value is a digit.<\/p>\n<p>If yes return true, else return false<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">3<\/td>\n<td><strong>isWhitespace<\/strong>()<\/p>\n<p>Checks if the given char value is white space.<\/p>\n<p>If yes return true, else return false<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">4<\/td>\n<td><strong>isUpperCase()<\/strong><\/p>\n<p>Checks if\u00a0 the given char value is uppercase.<\/p>\n<p>If yes return true, else return false<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">5<\/td>\n<td><strong>isLowerCase()<\/strong><\/p>\n<p>Checks if the given char value is lowercase.<\/p>\n<p>If yes return true, else return false<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">6<\/td>\n<td><strong>toUpperCase()<\/strong><\/p>\n<p>Returns the uppercase form of the given char value.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">7<\/td>\n<td><strong>toLowerCase()<\/strong><\/p>\n<p>Returns the lowercase form of the given char value.<\/td>\n<\/tr>\n<tr>\n<td class=\"ts\">8<\/td>\n<td><strong>toString()<\/strong><\/p>\n<p>Returns a String object representing the given character value that is, a one-character string.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Table 1.1: Character Methods<\/p>\n<p>&nbsp;<\/p>\n<p>I have therefore provided a code to test some of these method. I also recommend you try them yourself.<\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">class<\/span> <span style=\"color: #bb0066; font-weight: bold;\">Tester<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\r\n   <span style=\"color: #008800; font-weight: bold;\">public<\/span> <span style=\"color: #008800; font-weight: bold;\">static<\/span> <span style=\"color: #333399; font-weight: bold;\">void<\/span> <span style=\"color: #0066bb; font-weight: bold;\">main<\/span><span style=\"color: #333333;\">(<\/span>String args<span style=\"color: #333333;\">[])<\/span> <span style=\"color: #333333;\">{<\/span>\r\n\t   <span style=\"color: #333399; font-weight: bold;\">char<\/span> x <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0044dd;\">'7'<\/span><span style=\"color: #333333;\">;<\/span>\r\n\t   <span style=\"color: #333399; font-weight: bold;\">char<\/span> a <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0044dd;\">'A'<\/span><span style=\"color: #333333;\">;<\/span>\r\n\t   <span style=\"color: #333399; font-weight: bold;\">char<\/span> b <span style=\"color: #333333;\">=<\/span> <span style=\"color: #0044dd;\">'b'<\/span><span style=\"color: #333333;\">;<\/span>\r\n\t   \r\n\t   <span style=\"color: #888888;\">\/\/returns true since 7 is a number<\/span>\r\n\t   System<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span>Character<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">isDigit<\/span><span style=\"color: #333333;\">(<\/span>x<span style=\"color: #333333;\">));<\/span>\r\n\t   \r\n\t   <span style=\"color: #888888;\">\/\/returns false since 7 not a digit<\/span>\r\n\t   System<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span>Character<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">isLetter<\/span><span style=\"color: #333333;\">(<\/span>x<span style=\"color: #333333;\">));<\/span>\r\n\t   \r\n\t   <span style=\"color: #888888;\">\/\/returns true since A is uppercase<\/span>\r\n\t   System<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span>Character<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">isUpperCase<\/span><span style=\"color: #333333;\">(<\/span>a<span style=\"color: #333333;\">));<\/span>\r\n\t   \r\n\t   <span style=\"color: #888888;\">\/\/changes b to B<\/span>\r\n\t   System<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span>Character<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">toUpperCase<\/span><span style=\"color: #333333;\">(<\/span>b<span style=\"color: #333333;\">));<\/span>\r\n\t   \r\n\t   <span style=\"color: #888888;\">\/\/changes b from char to String<\/span>\r\n\t   System<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">out<\/span><span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">println<\/span><span style=\"color: #333333;\">(<\/span>Character<span style=\"color: #333333;\">.<\/span><span style=\"color: #0000cc;\">toString<\/span><span style=\"color: #333333;\">(<\/span>b<span style=\"color: #333333;\">));<\/span>\r\n   <span style=\"color: #333333;\">}<\/span>    \r\n<span style=\"color: #333333;\">}<\/span>\r\n<\/pre>\n<p>Listing 1.2: Demo of the Character Methods<\/p>\n<p>&nbsp;<\/p>\n<p>If you run the code in Listing 1.2, you will have the output below:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #008800; font-weight: bold;\">true<\/span>\r\n<span style=\"color: #008800; font-weight: bold;\">false<\/span>\r\n<span style=\"color: #008800; font-weight: bold;\">true<\/span>\r\nB\r\nb\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You probably know the difference between primitive types and wrapper classes. I recommend a brief review of this under Java Data Types. You also know &hellip; <\/p>\n","protected":false},"author":395,"featured_media":94,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java - The Character Class - Java Tutorials<\/title>\n<meta name=\"description\" content=\"In this tutorial, we learn about the character wrapper class. We also learn about the various methods available in the character class\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java - The Character Class - Java Tutorials\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we learn about the character wrapper class. We also learn about the various methods available in the character class\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/\" \/>\n<meta property=\"og:site_name\" content=\"Java Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-18T16:44:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-06T09:53:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Character-Class.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"950\" \/>\n\t<meta property=\"og:image:height\" content=\"518\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"kindsonthegenius\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"kindsonthegenius\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/\"},\"author\":{\"name\":\"kindsonthegenius\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\"},\"headline\":\"Java &#8211; The Character Class\",\"datePublished\":\"2019-01-18T16:44:39+00:00\",\"dateModified\":\"2020-08-06T09:53:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/\"},\"wordCount\":634,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Character-Class.jpg\",\"articleSection\":[\"Java Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/\",\"name\":\"Java - The Character Class - Java Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Character-Class.jpg\",\"datePublished\":\"2019-01-18T16:44:39+00:00\",\"dateModified\":\"2020-08-06T09:53:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\"},\"description\":\"In this tutorial, we learn about the character wrapper class. We also learn about the various methods available in the character class\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Character-Class.jpg\",\"contentUrl\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/wp-content\\\/uploads\\\/sites\\\/9\\\/2019\\\/01\\\/Character-Class.jpg\",\"width\":950,\"height\":518,\"caption\":\"The Characters class\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/15-java-the-character-class\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java &#8211; The Character Class\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#website\",\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/\",\"name\":\"Java Tutorials\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/#\\\/schema\\\/person\\\/63a68934672db675ff0cd80d066510c2\",\"name\":\"kindsonthegenius\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g\",\"caption\":\"kindsonthegenius\"},\"url\":\"https:\\\/\\\/www.kindsonthegenius.com\\\/java\\\/author\\\/kindsonthegenius-2\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java - The Character Class - Java Tutorials","description":"In this tutorial, we learn about the character wrapper class. We also learn about the various methods available in the character class","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/","og_locale":"en_US","og_type":"article","og_title":"Java - The Character Class - Java Tutorials","og_description":"In this tutorial, we learn about the character wrapper class. We also learn about the various methods available in the character class","og_url":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/","og_site_name":"Java Tutorials","article_published_time":"2019-01-18T16:44:39+00:00","article_modified_time":"2020-08-06T09:53:34+00:00","og_image":[{"width":950,"height":518,"url":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Character-Class.jpg","type":"image\/jpeg"}],"author":"kindsonthegenius","twitter_card":"summary_large_image","twitter_misc":{"Written by":"kindsonthegenius","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#article","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/"},"author":{"name":"kindsonthegenius","@id":"https:\/\/www.kindsonthegenius.com\/java\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2"},"headline":"Java &#8211; The Character Class","datePublished":"2019-01-18T16:44:39+00:00","dateModified":"2020-08-06T09:53:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/"},"wordCount":634,"commentCount":0,"image":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Character-Class.jpg","articleSection":["Java Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/","url":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/","name":"Java - The Character Class - Java Tutorials","isPartOf":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#primaryimage"},"image":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#primaryimage"},"thumbnailUrl":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Character-Class.jpg","datePublished":"2019-01-18T16:44:39+00:00","dateModified":"2020-08-06T09:53:34+00:00","author":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2"},"description":"In this tutorial, we learn about the character wrapper class. We also learn about the various methods available in the character class","breadcrumb":{"@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#primaryimage","url":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Character-Class.jpg","contentUrl":"https:\/\/www.kindsonthegenius.com\/java\/wp-content\/uploads\/sites\/9\/2019\/01\/Character-Class.jpg","width":950,"height":518,"caption":"The Characters class"},{"@type":"BreadcrumbList","@id":"https:\/\/www.kindsonthegenius.com\/java\/15-java-the-character-class\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.kindsonthegenius.com\/java\/"},{"@type":"ListItem","position":2,"name":"Java &#8211; The Character Class"}]},{"@type":"WebSite","@id":"https:\/\/www.kindsonthegenius.com\/java\/#website","url":"https:\/\/www.kindsonthegenius.com\/java\/","name":"Java Tutorials","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kindsonthegenius.com\/java\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.kindsonthegenius.com\/java\/#\/schema\/person\/63a68934672db675ff0cd80d066510c2","name":"kindsonthegenius","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3079a7f663b02e801d03cd075852a037af36bd179b5fbcd0603bae3dd7833a9b?s=96&d=mm&r=g","caption":"kindsonthegenius"},"url":"https:\/\/www.kindsonthegenius.com\/java\/author\/kindsonthegenius-2\/"}]}},"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/users\/395"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":4,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/posts\/93\/revisions\/205"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/media\/94"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/java\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}