public static char [ ] createCharArray ( int size , char defaultVal ) { char [ ] retval = new char [ size ] ; if ( size > 0 ) { if ( size < 500 ) { for ( int i = 0 ; i < size ; i ++ ) { retval [ i ] = defaultVal ; } } else { initializelLargeCharArray ( retval , defaultVal ) ; } } return retval ; }
Creates a character array and initializes it with a default value .