2015-09-07 11:44:36 -06:00
|
|
|
// control/ListCharacters.java
|
2016-12-30 17:23:13 -08:00
|
|
|
// (c)2017 MindView LLC: see Copyright.txt
|
2015-11-15 15:51:35 -08:00
|
|
|
// We make no guarantees that this code is fit for any purpose.
|
2016-09-23 13:23:35 -06:00
|
|
|
// Visit http://OnJava8.com for more book information.
|
2016-01-25 18:05:55 -08:00
|
|
|
// List all the lowercase ASCII letters
|
2015-06-15 17:47:35 -07:00
|
|
|
|
|
|
|
public class ListCharacters {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
for(char c = 0; c < 128; c++)
|
|
|
|
if(Character.isLowerCase(c))
|
|
|
|
System.out.println("value: " + (int)c +
|
|
|
|
" character: " + c);
|
|
|
|
}
|
2015-09-07 11:44:36 -06:00
|
|
|
}
|
|
|
|
/* Output: (First 10 Lines)
|
2015-06-15 17:47:35 -07:00
|
|
|
value: 97 character: a
|
|
|
|
value: 98 character: b
|
|
|
|
value: 99 character: c
|
|
|
|
value: 100 character: d
|
|
|
|
value: 101 character: e
|
|
|
|
value: 102 character: f
|
|
|
|
value: 103 character: g
|
|
|
|
value: 104 character: h
|
|
|
|
value: 105 character: i
|
|
|
|
value: 106 character: j
|
|
|
|
...
|
2015-09-07 11:44:36 -06:00
|
|
|
*/
|