-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharArray.java
More file actions
25 lines (22 loc) · 551 Bytes
/
CharArray.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
package sepidsal;
import java.io.*;
/**
*
* @author Sepideh Saljooghi
*/
public class CharArray {
public static void main(String args[]){
try{
char[] array = {'s','e','p','i','d','a','l'};
CharArrayReader reader = new CharArrayReader(array);
int i=0;
while((i=reader.read())!=-1){
char chr= (char)i;
System.out.println(chr + " : " + i);
}
}
catch(Exception e){
System.out.print(e);
}
}
}