Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Array
- {
- public static void main ( String [] args)
- {
- char [] arrch = {'A', 'B', 'C', 'D'};
- char [] another = {'a', 'b', 'c'};
- arrch = another;
- another[1] = 'B';
- print(arrch);
- }
- public static void print( char [] a )
- {
- System.out.print("[");
- for(int i = 0; i < a.length; i++)
- {
- System.out.print(" " + a[i] + " ");
- }
- System.out.println("]");
- }
- }
Add Comment
Please, Sign In to add comment