Java 8 String类API 手册 翻译 中英文对照

最近在看JAVA8的API英文手册,了解JAVA 8 API的同时也提升下自己的英文文档阅读鞥哪里,基本对照着中文手册看的,但是看完过一会儿就又忘记了,所以就想着记录一下。那就写到博客里吧。
翻译的中文基本是从https://www.matools.com/api/java8搬运过来的,只不过拆成了一段话一段话对应的,不需要再打开两个浏览器看了。并且会把高频单词列出来

String

// 下面是String类的定义,可以看到String类继承了Object类,实现了Serializable,Comparable,CharSequence接口

public final class String
extends Object
implements Serializable, Comparable<String>, CharSequence

原文:The String class represents character strings. All string literals in Java programs, such as “abc”, are implemented as instances of this class.
单词:represents[代表] ,character [字符] ,strings,String [字符串],literals [文字],programs[程序/项目],implemented [实现],instances [实例]
翻译:String类型代表字符串。JAVA中所有的字符串文字(例如“abc”),都被实现为这个类的实例

String str = "abc";

原文:is equivalent to:
单词:equivalent :等效于
翻译:相当于

char data[] = {'a', 'b', 'c'};
 String str = new String(data);

原文:Here are some more examples of how strings can be used:
翻译:以下是一些如何使用字符串的示例

System.out.println("abc");
String cde = "cde";
// + 拼接两个字符串
System.out.println("abc" + cde);
// substring 获取字符串的子串
String c = "abc".substring(2,3);
String d = cde.substring(1, 2);

原文:The class String includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase. Case mapping is based on the Unicode Standard version specified by the Character class.
单词:examine,examining[检查]individual[个人],sequence[序列],compare,comparing [比较],extracting[提取],translated [翻译],map,mapping[映射],specify,specified[指定的],
翻译:String类包括用于检查序列的各个字符的方法,用于比较字符串,搜索字符串,提取子字符串和创建一个将所有字符转为大写或小写的副本。实例映射基于Character类指定的Unicode标准版本。
未完待续…

原文:The Java language provides special support for the string concatenation operator ( + ), and for conversion of other objects to strings. String concatenation is implemented through the StringBuilder(or StringBuffer) class and its append method. String conversions are implemented through the method toString, defined by Object and inherited by all classes in Java. For additional information on string concatenation and conversion, see Gosling, Joy, and Steele, The Java Language Specification.
单词:concatenation[关联],operator[操作],conversion[转换],inherit,inherited[继承],Specification[规格,说明书]
野生翻译:Java语言对字符串连接操作和其他对象转换为字符串提供了特殊的支持。通过StringBuilder(或StringBuffer)类和他的append方法实现字符关联。在Java中,通过定义为Object和继承所有类的toString方法实现字符转换。字符串关联和转换的其他信息,参阅Gosling, Joy, 和 Steele, Java语言规范。
官方翻译:Java语言为连接字符串(+)提供支持,并为其他对象转换为字符串。字符串连接时通过StringBuilder(或 StringBuffer) 类及他的append方法实现的。字符串转换是通过方法来实现toString,由下式定义Object和继承所有的类。 有关字符串连接和转换的其他信息,请参阅Gosling,Joy和Steele, Java语言规范 。

原文:A String represents a string in the UTF-16 format in which supplementary characters are represented by surrogate pairs (see the section Unicode Character Representations in the Character class for more information). Index values refer to char code units, so a supplementary character uses two positions in a String.
单词:format 【格式】,supplementary【补充】,surrogate 【代理】,pairs 【双,一副】,section 【部分】,positions 【职位,位置,定位】,refer to 【指,参考】
翻译:A String 代表utf-16格式的字符串,其中补充字符由代理对表示(详细信息请参阅Character 类中Character部分的统一标准)索引值指char代码单元,因此补充字符在String中使用两个String

原文:The String class provides methods for dealing with Unicode code points (i.e., characters), in addition to those for dealing with Unicode code units (i.e., char values).

翻译:String类型提供了处理Unicode 代码点(即字符)的方法,以及用于处理Unicode代码单元(即char值)的方法

Field Summary(字段汇总)

Modifier and Type(修饰符和类型) Field and Description(字段和描述)
static Comparator <String> CASE_INSENSITIVE_ORDER
原文:A Comparator that orders String objects as by compareToIgnoreCase.
翻译:一个比较器按compareToIgnoreCase订购String对象

单词
Comparator 【比较器】,fields【字段】,Summary【总结,概要】

Constructor Summary(构造方法摘要)

String
public String()
原文:Initializes a newly created String object so that it represents an empty character sequence. Note that use of this constructor is unnecessary since Strings are immutable.
翻译:初始化一个新的String对象,以使其示一个空的字符序列。请注意不必要使用此字符序列因为Strings是不可变的

单词
Constructor 【构造方法,构造函数,构造器】,immutable【不可变的】

太困了,先睡觉 Zzzz

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章