public static String getName ( final int parts ) { final StringBuilder buff = new StringBuilder ( ) ; for ( int i = 0 ; i < parts ; i ++ ) { if ( buff . length ( ) != 0 ) { buff . append ( ' ' ) ; } buff . append ( NATOALPHABET [ ( int ) ( Math . random ( ) * NATOALPHABET . length ) ] ) ; } return buff . toString ( ) ; }
Creates a random name .