private static String getRequiredSpaces ( String reference , String message ) { StringBuilder res = new StringBuilder ( ) ; int requiredSpaces = reference . length ( ) - message . length ( ) - 4 ; for ( int i = 0 ; i < requiredSpaces ; i ++ ) { res . append ( " " ) ; } return res . toString ( ) ; }
Formats a message to be printed on the console