StringBuffer: append(float f) : StringBuffer « java.lang « Java by API






StringBuffer: append(float f)

 


public class Main {
  public static void main(String[] args) {
    StringBuffer sb = new StringBuffer();

    sb.append(true);

    sb.append('A');

    char[] carray = { 'a', 'b', 'c' };
    sb.append(carray);

    sb.append(carray, 0, 1);

    sb.append(3.5d);

    sb.append(2.4f);

    sb.append(45);

    sb.append(90000l);

    sb.append("That's all!");

    System.out.println(sb);
  }
}

   
  








Related examples in the same category

1.new StringBuffer(int size)
2.new StringBuffer(String str)
3.StringBuffer: append(char c)
4.StringBuffer: append(char[] str, int offset, int len)
5.StringBuffer: append(CharSequence s, int start, int end)
6.StringBuffer: append(double d)
7.StringBuffer: append(int intValue)
8.StringBuffer: append(long lng)
9.StringBuffer: append(String stringValue)
10.StringBuffer: capacity
11.StringBuffer: charAt(int index)
12.StringBuffer: delete(int start, int end)
13.StringBuffer: deleteCharAt(int pos)
14.StringBuffer: getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
15.StringBuffer: insert(int offset, boolean b)
16.StringBuffer: insert(int offset, char c)
17.StringBuffer: insert(int offset, char[] str)
18.StringBuffer: insert(int offset, double d)
19.StringBuffer: insert(int offset, float f)
20.StringBuffer: insert(int offset, int i)
21.StringBuffer: insert(int offset, long l)
22.StringBuffer: insert(int offset, Object obj)
23.StringBuffer: insert(int offset, String stringValue)
24.StringBuffer: lastIndexOf(String str)
25.StringBuffer: length()
26.StringBuffer: replace(int start, int end, String str)
27.StringBuffer: reverse()
28.StringBuffer: setCharAt(int index)
29.StringBuffer: setLength(int length)
30.StringBuffer: toString()