Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
org.apache.commons.lang3.text.StrBuilder Example
What is org.apache.commons.lang3.text.StrBuilder class? How to use org.apache.commons.lang3.text.StrBuilder class?
✍: FYIcenter.com
org.apache.commons.lang3.text.StrBuilder class is a Java class
offered in commons-lang3.jar that
builds a string from constituent parts providing a more flexible and powerful API than StringBuffer
Methods in StrBuilder class that are note StringBuffer and StringBuilder classes:
Here is a simple example of org.apache.commons.lang3.text.StrBuilder class:
// Copyright (c) 2016 FYIcenter.com
import org.apache.commons.lang3.text.StrBuilder;
// Example of using the StrBuilder class
public class StrBuilderExample {
public static void main(String[] args) throws Exception {
// Create an empty StrBuilder
StrBuilder builder = new StrBuilder();
// Append a String
builder.append("Emergency ");
// Append a StrBuilder
builder.append(new StrBuilder("number:"));
// Append a newline
builder.appendNewLine();
// Append a char[]
builder.append(new char[6]);
// Append an int
builder.appendln(911);
// Build the final String
String str = builder.build();
System.out.println(str);
}
}
You can compile and run the above example in a command window as shown below:
C:\fyicenter>\local\jdk-1.8.0\bin\javac
-cp C:\local\commons-lang3-3.5\commons-lang3-3.5.jar
StrBuilderExample.java
C:\fyicenter>\local\jdk-1.8.0\bin\java
-cp .;C:\local\commons-lang3-3.5\commons-lang3-3.5.jar
StrBuilderExample
Emergency number:
911
⇒ org.apache.commons.lang3.text.StrSubstitutor Example
⇐ Class Packages in Apache commons-lang3-3.5.jar
2016-11-24, ∼3225🔥, 0💬
Popular Posts:
Java Architecture for XML Binding (JAXB) is a Java API that allows Java developers to map Java class...
JDK 17 jdk.dynalink.jmod is the JMOD file for JDK 17 Dynamic Linking module. JDK 17 Dynamic Linking ...
Java Servlet API 4.0.1 Source Code Files are important if you want to compile them with different JD...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...