String str1 = String.format("%5s", "dgg");

String str2 = String.format("%-5s", "dgg");

System.out.println("++"+str1+"++");

System.out.println("++"+str2+"++");

String str3=String.format("%05d", Integer.parseInt("55"));

System.out.println("++"+str3+"++");

 

 

===============================================

String.format("After DB action complete, there are %d entities in the queue.", 4)