java 基础类型
Posted 懒企鹅
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java 基础类型相关的知识,希望对你有一定的参考价值。
String:
public final class String implements java.io.Serializable, Comparable<String>, CharSequence { /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the string */ private int hash; // Default to 0 /** use serialVersionUID from JDK 1.0.2 for interoperability */ private static final long serialVersionUID = -6849794470754667710L; ... }
StringBuffer:
public final class StringBuffer extends AbstractStringBuilder implements java.io.Serializable, CharSequence { @Override public synchronized StringBuffer append(Object obj) { toStringCache = null; super.append(String.valueOf(obj)); return this; } }
StringBuilder:
public final class StringBuilder extends AbstractStringBuilder implements java.io.Serializable, CharSequence { @Override public StringBuilder append(Object obj) { return append(String.valueOf(obj)); } }
以上是关于java 基础类型的主要内容,如果未能解决你的问题,请参考以下文章