string.html
来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 1,147 行 · 第 1/5 页
HTML
1,147 行
<CODE>static <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>String.</B><B><A HREF="../String.html#format(java.util.Locale, java.lang.String, java.lang.Object...)">format</A></B>(<A HREF="../../util/Locale.html" title="java.util 中的类">Locale</A> l, <A HREF="../String.html" title="java.lang 中的类">String</A> format, <A HREF="../Object.html" title="java.lang 中的类">Object</A>... args)</CODE><BR> 使用指定的语言环境、格式字符串和参数返回一个格式化字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>String.</B><B><A HREF="../String.html#format(java.lang.String, java.lang.Object...)">format</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A> format, <A HREF="../Object.html" title="java.lang 中的类">Object</A>... args)</CODE><BR> 使用指定的格式字符串和参数返回一个格式化字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Class.</B><B><A HREF="../Class.html#getCanonicalName()">getCanonicalName</A></B>()</CODE><BR> 返回《Java Language Specification》中所定义的基础类的规范化名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>StackTraceElement.</B><B><A HREF="../StackTraceElement.html#getClassName()">getClassName</A></B>()</CODE><BR> 返回类的完全限定名,该类包含由该堆栈跟踪元素所表示的执行点。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>System.</B><B><A HREF="../System.html#getenv(java.lang.String)">getenv</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A> name)</CODE><BR> 获得指定的环境变量值。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>StackTraceElement.</B><B><A HREF="../StackTraceElement.html#getFileName()">getFileName</A></B>()</CODE><BR> 返回源文件名,该文件包含由该堆栈跟踪元素所表示的执行点。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getImplementationTitle()">getImplementationTitle</A></B>()</CODE><BR> 返回此包的标题。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getImplementationVendor()">getImplementationVendor</A></B>()</CODE><BR> 返回提供该实现的组织、供应商或公司的名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getImplementationVersion()">getImplementationVersion</A></B>()</CODE><BR> 返回该实现的版本。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Throwable.</B><B><A HREF="../Throwable.html#getLocalizedMessage()">getLocalizedMessage</A></B>()</CODE><BR> 创建此 throwable 的本地化描述。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Throwable.</B><B><A HREF="../Throwable.html#getMessage()">getMessage</A></B>()</CODE><BR> 返回此 throwable 的详细消息字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>StackTraceElement.</B><B><A HREF="../StackTraceElement.html#getMethodName()">getMethodName</A></B>()</CODE><BR> 返回方法名,此方法包含由该堆栈跟踪元素所表示的执行点。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Class.</B><B><A HREF="../Class.html#getName()">getName</A></B>()</CODE><BR> 以 <tt>String</tt> 的形式返回此 <tt>Class</tt> 对象所表示的实体(类、接口、数组类、基本类型或 void)名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Thread.</B><B><A HREF="../Thread.html#getName()">getName</A></B>()</CODE><BR> 返回该线程的名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>ThreadGroup.</B><B><A HREF="../ThreadGroup.html#getName()">getName</A></B>()</CODE><BR> 返回此线程组的名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getName()">getName</A></B>()</CODE><BR> 返回此包的名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>System.</B><B><A HREF="../System.html#getProperty(java.lang.String)">getProperty</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A> key)</CODE><BR> 获得指定键指示的系统属性。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>System.</B><B><A HREF="../System.html#getProperty(java.lang.String, java.lang.String)">getProperty</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A> key, <A HREF="../String.html" title="java.lang 中的类">String</A> def)</CODE><BR> 获得用指定键描述的系统属性。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Class.</B><B><A HREF="../Class.html#getSimpleName()">getSimpleName</A></B>()</CODE><BR> 返回源代码中给出的基础类的简称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getSpecificationTitle()">getSpecificationTitle</A></B>()</CODE><BR> 返回此包实现的规范标题。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getSpecificationVendor()">getSpecificationVendor</A></B>()</CODE><BR> 返回拥有并维护实现此包的类规范的组织、供应商或公司的名称。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Package.</B><B><A HREF="../Package.html#getSpecificationVersion()">getSpecificationVersion</A></B>()</CODE><BR> 返回此包实现的规范的版本号。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>String.</B><B><A HREF="../String.html#intern()">intern</A></B>()</CODE><BR> 返回字符串对象的规范化表示形式。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>System.</B><B><A HREF="../System.html#mapLibraryName(java.lang.String)">mapLibraryName</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A> libname)</CODE><BR> 将一个库名称映射到特定于平台的、表示本机库的字符串中。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>Enum.</B><B><A HREF="../Enum.html#name()">name</A></B>()</CODE><BR> 返回此枚举常量的名称,在其枚举声明中对其进行声明。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>String.</B><B><A HREF="../String.html#replace(char, char)">replace</A></B>(char oldChar, char newChar)</CODE><BR> 返回一个新的字符串,它是通过用 <code>newChar</code> 替换此字符串中出现的所有 <code>oldChar</code> 而生成的。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>String.</B><B><A HREF="../String.html#replace(java.lang.CharSequence, java.lang.CharSequence)">replace</A></B>(<A HREF="../CharSequence.html" title="java.lang 中的接口">CharSequence</A> target, <A HREF="../CharSequence.html" title="java.lang 中的接口">CharSequence</A> replacement)</CODE><BR> 使用指定的字面值替换序列替换此字符串匹配字面值目标序列的每个子字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../String.html" title="java.lang 中的类">String</A></CODE></FONT></TD><TD><CODE><B>String.</B><B><A HREF="../String.html#replaceAll(java.lang.String, java.lang.String)">replaceAll</A></B>(<A HREF="../String.html" title="java.lang 中的类">String</A> regex, <A HREF="../String.html" title="java.lang 中的类">String</A> replacement)</CODE><BR> 使用给定的 replacement 字符串替换此字符串匹配给定的<a href="../../util/regex/Pattern.html#sum">正则表达式</a>的每个子字符串。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?