Java StringBuilder.append(long lng)

Syntax

StringBuilder.append(long lng) has the following syntax.

public StringBuilder append(long lng)

Example

In the following code shows how to use StringBuilder.append(long lng) method.


/*from  w  w  w  .  java  2s.com*/
public class Main {

  public static void main(String[] arg) {

    StringBuilder buffer = new StringBuilder();
    
    long l = 123456789098765L;
    buffer.append(l);
    
    System.out.println(buffer);
  }

}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable