DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Helsinki, Finland
    Posts
    6

    Need help with simple program

    I need to make a program that displays each char value from a to z, basically listing the alphabet. How exactly would I do this? Should I use the for() method until I reach z?

  2. #2
    Join Date
    Aug 2005
    Posts
    43
    each character has a numeric representation...if i'm not mistaken, A=65, B=66, ... Z=90, so you can have a for loop from 65 to 90, casting these ints into chars....

    Code:
    		for(int i=65;i<=90;i++) {
    			System.out.println((char)i);
    		}
    ps. these would print the characters in uppercase letters, look for an ASCII table to see their representation in lowecase.

Similar Threads

  1. Replies: 1
    Last Post: 11-12-2005, 04:37 AM
  2. Network Program Help
    By thedrew in forum Java
    Replies: 0
    Last Post: 10-12-2005, 09:12 AM
  3. Replies: 7
    Last Post: 04-26-2002, 11:25 AM
  4. The invisible program
    By James Abbott in forum VB Classic
    Replies: 2
    Last Post: 11-24-2001, 05:04 AM
  5. The invisible program
    By James Abbott in forum VB Classic
    Replies: 0
    Last Post: 11-24-2001, 01:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links