- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharArray.java
More file actions
Latest commit
25 lines (22 loc) · 551 Bytes
/
Copy pathCharArray.java
File metadata and controls
25 lines (22 loc) · 551 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
packagesepidsal;
importjava.io.*;
/**
*
* @author Sepideh Saljooghi
*/
publicclassCharArray {
publicstaticvoidmain(Stringargs[]){
try{
char[] array = {'s','e','p','i','d','a','l'};
CharArrayReaderreader = newCharArrayReader(array);
inti=0;
while((i=reader.read())!=-1){
charchr= (char)i;
System.out.println(chr + " : " + i);
}
}
catch(Exceptione){
System.out.print(e);
}
}
}