The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java Program to Print Alphabets in Upper and Lower Case

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
Java Program to Print Alphabets in Upper and Lower Case Posted: Mar 2, 2014 5:34 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: Java Program to Print Alphabets in Upper and Lower Case
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
One of the textbook exercise to get start with any programming language is writing a program to print alphabets in both upper and lower case. This program allows you to explore the String class in Java with toUpperCase() and toLowerCase() method but normally when you start, it's asked to do this without any API methods. This kind of exercise actually improves your understanding of programming language e.g. basic operators, data types like int and char. It's similar to your prime number, Fibonacci series and factorial program exercise. I strongly suggest to do this textbook exercises to any one who is just started learning a new programming language. Coming back to this program, Java has a datatype called char, which is 2 byte unsigned integer type. It is used to store characters in Java  e.g. char A = 'A'. Similar to String literal "A" we also have character literal 'A' which is letters enclosed in single quotes.  There is worth-noting difference between storing character literal in char and int data type in Java. If you store character literal on integer variable e.g. int i = 'a'; will store ASCII value of 'a' and when you print, it will prints ASCII value of 'a'.
Read more »

Read: Java Program to Print Alphabets in Upper and Lower Case

Topic: February 2014 New Java Performance Tips Previous Topic   Next Topic Topic: Cryptography & Theory 2: What is Pseudorandom

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use