Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#81 top 10 java interview questions i recently faced #130

Conversation

AtlantisLee
Copy link
Contributor

@AtlantisLee AtlantisLee commented Nov 26, 2018

(提交翻译请使用下面的模板,其他类型pr请删除)

closes #81

1.译者信息

(请大家一定要填伯乐在线个人主页这一项,方便署名,🙏)

伯乐在线个人主页 GitHub
ZIDANE AtlantisLee

2.疑问区

不确定的地方已经用删除线标记,烦请多多关注
(可在此区域列举有疑问的语句,提示校对人员重点关注)

3.自查表

  • 确认pr的目标分支是trans分支
  • 确认pr不包含除译文以外的文件
  • 补充评论区closes关键字以关联对应issue
  • 通读文章,确保读者(非译者)能够理解文章内容(语言性,非技术性)
  • 通读文章,确保语句通顺(有疑问语句请在疑问区提出)
  • 符合排版规范要求

4.发布信息(译者无需填写)

发布链接:


@hanxiaomax

@ghost ghost added the B3-Need review 完成翻译待校对,请至对应的pr认领校对并添加校对中标签 label Nov 26, 2018
@hanxiaomax
Copy link
Member

@AtlantisLee 麻烦填一下伯乐在线个人主页的地址

@AtlantisLee
Copy link
Contributor Author

@hanxiaomax 好的,加上了

@hanxiaomax hanxiaomax added B4-Reviewing 文章正在校对中,完成后评论合入主线并添加C1 and removed B3-Need review 完成翻译待校对,请至对应的pr认领校对并添加校对中标签 labels Nov 26, 2018
@hanxiaomax hanxiaomax self-requested a review November 26, 2018 16:03
@hanxiaomax
Copy link
Member

认领校对

@ghost ghost assigned AtlantisLee Dec 2, 2018
Copy link
Member

@hanxiaomax hanxiaomax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

麻烦修改一下

你应该知道以下几个重点:

- **Lambda expressions**, a new language feature, has been introduced in this release. Lambda expressions enable you to treat functionality as a method argument or code as data. Lambda expressions let you express instances of single-method interfaces (referred to as functional interfaces) more compactly.
**lambda 表达式**,Java 8 版本引入的一个新特性。~~lambda 表达式允许你将功能当作方法参数或将代码当作数据~~。lambda 表达式还能让你以更简洁的方式表示只有一个方法的接口 (称为函数式接口) 的实例。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为啥划掉了?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加删除线的都是不太确定的...

**重复注解**支持在同一声明或类型上多次应用同一注解类型。

- **Type annotations** provide the ability to apply an annotation anywhere a type is used and not just on a declaration. Used with a pluggable type system, this feature enables improved type checking of your code.
**类型注解**支持在任何使用类型的地方应用注解,而不仅限于声明。~~此特性与可插入型系统一起使用时~~,可增强对代码的类型检查。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里也划掉了

### 为什么 String 对象是不可变的?

1. [String pool](https://www.journaldev.com/797/what-is-java-string-pool) is possible only because String is immutable in Java. This way, Java Runtime saves a lot of Java heap space, because different String variables can refer to the same String variable in the pool. If String is not immutable, then String interning would not have been possible, because if any variable would have changed the value, it would have been reflected in other variables.
[字符串池](https://www.journaldev.com/797/what-is-java-string-pool)之所以可能,就是因为字符串在 java 中是不可变的。由此 Java 运行时环境节省了大量堆空间,因为不同的 String 变量可以引用池中的同一 String 变量。如果 String 不是不可变的, 则 String 内部操作将是不可能的,因为一旦任一变量更改所引用的String对象的值,它也会反映在其他变量中。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String interning 字符串驻留。要用括号保留英文原文并添加一个wiki或百度的链接

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Member

@hanxiaomax hanxiaomax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@hanxiaomax hanxiaomax merged commit b9d7f6d into jobbole:trans Dec 4, 2018
@ghost ghost removed the B4-Reviewing 文章正在校对中,完成后评论合入主线并添加C1 label Dec 4, 2018
@AtlantisLee AtlantisLee deleted the #81-Top-10-Java-Interview-Questions-I-Recently-Faced branch December 4, 2018 12:31
@hanxiaomax hanxiaomax added C1-Finished 校对完成,待发布 M-importNew labels Dec 18, 2018
@tangyouhua
Copy link

已发布 http://www.importnew.com/30956.html

@tangyouhua tangyouhua added C2-Published 文章已发布至伯乐在线 and removed C1-Finished 校对完成,待发布 labels Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C2-Published 文章已发布至伯乐在线 M-importNew
Projects
None yet
Development

Successfully merging this pull request may close these issues.

常被问到的10个Java面试题
3 participants