View Single Post
  #3 (permalink)  
Old 07-05-2008, 09:41 PM
Nicholas Jordan's Avatar
Nicholas Jordan Nicholas Jordan is offline
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 780
Nicholas Jordan is on a distinguished road
simple ascii printable character set.
Normally, it is better not to do this but the handy utility here is a good tool for beginners to have: It shows the base ascii printable characters.

Code:
// An array may not hold all the letters of the alphabet. // A print all ascii char utility. Save some beginners // several sluggish starts, use a StringBuffer public class AlphaZetaBet { // String Buffer - we do not know how far it will go. StringBuffer stringBuffer = new StringBuffer(26); String getCharacters() { // note the single tick marks for a char char c = ' ';// space, the beginning of printable // This stops on backspace character. do { stringBuffer.append(c++); } while(c < 0x7f); return stringBuffer.toString(); } public static void main (String [] args) { AlphaZetaBet azb = new AlphaZetaBet(); System.out.println(azb.getCharacters()); } }
Bye all!
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Reply With Quote