public class Main
{
public static void main(String[] args)
/**
来 自
N o w J a v a . c o m
**/
{
Object objectRef = "hello";
String string = "goodbye";
char[] charArray = {'a', 'b', 'c', 'd', 'e', 'f'};
boolean booleanValue = true;
char characterValue = 'K';
int integerValue = 7;
long longValue = 10000000;
float floatValue = 2.5f; // f suffix indicates that 2.5 is a float
double doubleValue = 33.333;
StringBuilder buffer = new StringBuilder();
buffer.insert(0, objectRef)
.insert(0, " ") // each of these contains new line
.insert(0, string)
.insert(0, " ")// 来 自 n o w j a v a . c o m - 时代Java
.insert(0, charArray)
.insert(0, " ")
.insert(0, charArray, 3, 3)
.insert(0, " ")
.insert(0, booleanValue)
.insert(0, " ")
.insert(0, characterValue)
.insert(0, " ")
.insert(0, integerValue)
.insert(0, " ")
.insert(0, longValue)
.insert(0, " ")
.insert(0, floatValue)
.insert(0, " ")
.insert(0, doubleValue);
System.out.printf(
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。