char[] finishedArray = new char[0];
char[] arrayToCheck = new char[]{ 'a', 'b', 'c', 'd', 'e', 'f', 'g' };
for( int i = 0; i < arrayToCheck.length; i++ )
{
if( !doesNOTMeetSomeCondition( arrayToCheck[ i ] ) )
{
//DOES meet keep condition, add to new array
char[] newCharArray = new char[ finishedArray.length + 1 ];
for( int j = 0; j < finishedArray.length; j++ )
{
newCharArray[ j ] = finishedArray[ j ];
}
newCharArray[ finishedArray.length ] = arrayToCheck[ i ];
finishedArray = newCharArray;
}
}
//finishedArray contains desired result
A list would be much more fitting tool if you can change the data structure and are comfortable using Strings to contain the chars.
List<String> finishedList = Arrays.asList( 'a', 'b', 'c', 'd', 'e', 'f', 'g' );
for( String charInList : finishedList )
{
if( doesNOTMeetSomeCondition( charInList.toCharArray()[ 0 ] ) )
{
finishedList.remove( charInList );
}
}
//finishedList contains the desired result