To clean console of your command line application,use following code :
/**
* This method clear the current screen
*
*
*/
public static void clearScreen() {
System.out.print("\033[H\033[2J");
System.out.flush();
}
To make bold size of any string,
public void boldSizeOfString()
{
String strNormalSize = "\033[0;0m";
String strBoldSize = "\033[0;1m";
System.out.println (strNormalSize + "My Name is Anthony Gonsalves" + strBoldSize);
}