{"id":1373,"date":"2011-04-27T09:01:58","date_gmt":"2011-04-27T16:01:58","guid":{"rendered":"http:\/\/juixe.com\/techknow\/?p=1373"},"modified":"2011-04-24T11:31:14","modified_gmt":"2011-04-24T18:31:14","slug":"how-to-print-the-alphabet-in-java","status":"publish","type":"post","link":"http:\/\/juixe.com\/techknow\/index.php\/2011\/04\/27\/how-to-print-the-alphabet-in-java\/","title":{"rendered":"How To Print The Alphabet in Java?"},"content":{"rendered":"<p>In Java, the primitive value of type char can be converted to the primitive int.  An an integer within the range of a character can be converted to a char.  For example, the <a href=\"http:\/\/en.wikipedia.org\/wiki\/ASCII\">ASCII character code<\/a> for the character A is 65, for B is 66, etc.  Because of a char value can be interchanged with the integer value that represents its character code I can create a loop that starts from the letter A and stops at the character Z and I increment one character at a time.  Here is the code snippet to print each letter of the alphabet in a loop.<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nfor(char c = 'A'; c &lt;= 'Z'; c++) {\r\n    System.out.print(c);\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In Java, the primitive value of type char can be converted to the primitive int. An an integer within the range of a character can be converted to a char. For example, the ASCII character code for the character A is 65, for B is 66, etc. Because of a char value can be interchanged [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[15,19,3],"tags":[507,30,802,505,506],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p902K-m9","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/1373"}],"collection":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/comments?post=1373"}],"version-history":[{"count":1,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/1373\/revisions"}],"predecessor-version":[{"id":1374,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/posts\/1373\/revisions\/1374"}],"wp:attachment":[{"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/media?parent=1373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/categories?post=1373"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/juixe.com\/techknow\/index.php\/wp-json\/wp\/v2\/tags?post=1373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}