Appending Formats to Strings in Java -


I have this code in Java, Recipient Methods Back Strings:

  String StringBilder = " "; Stringbuilder = string.format ("% d /% d \ n", this.getSlotNum (), this.getPortNum ()); Stringbuilder = stringbill + string Format ("++ this.getPortSpeed ​​(+ + +" \ n "); StringBuilder = StringBiltter + String.format ("% d \ n ", this.getPortMode ()); There is a stringbuilder class in C # AndandFormat () is the method that allows me to insert the stringing ballilder instance directly without any formatted string. I do not see an addend format () method in the Java StringBuider class. Am I trying to do a better Which way do you want?   

Looks like a Java class that you want:

 
Formatter format = new format (); Formatter.format ("hello, world \ n"); if (name! = Null) {formatter.format ("my name is% s \ n", name is);} Other {formatter.format ("Please email me at% s", email);} DoUse (formatter.toString ();

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

c# - NewtonSoft JArray - how to select multiple elements with LINQ -

javascript - amcharts makechart not working -