Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dc787bf

Browse filesBrowse files
committed
Merge pull request giantray#31 from Tneciv/master
一些校正
2 parents 532ff0c + 116bdcc commit dc787bf
Copy full SHA for dc787bf

File tree

Expand file treeCollapse file tree

3 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+6
-6
lines changed

‎contents/breaking-out-of-nested-loops-in-java.md

Copy file name to clipboardExpand all lines: contents/breaking-out-of-nested-loops-in-java.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ for (Type type : types) {
1414

1515
###回答
1616

17-
可以用brea+label的语法,例子如下
17+
可以用break+label的语法,例子如下
1818
```java
1919
public class Test {
2020
public static void main(String[] args) {
@@ -36,4 +36,4 @@ public class Test {
3636
首先在for循环前加标签,如例子中的outerloop,然后在for循环内break label(如本例的outerloop),就会跳出该label指定的for循环。
3737

3838
stackoverflow链接:
39-
http://stackoverflow.com/questions/886955/breaking-out-of-nested-loops-in-java
39+
http://stackoverflow.com/questions/886955/breaking-out-of-nested-loops-in-java

‎contents/generating-random-integers-in-a-range-with-Java.md

Copy file name to clipboardExpand all lines: contents/generating-random-integers-in-a-range-with-Java.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int num =(int)(Math.random() * 11);
1010
1111
```
1212

13-
那如何产生 “5= 随机数 <= 10” 的随机数呢?
13+
那如何产生 “5 <= 随机数 <= 10” 的随机数呢?
1414

1515
```
1616
int num = 5 + (int)(Math.random() * 6);
@@ -29,7 +29,7 @@ int num = min + (int)(Math.random() * (max-min+1));
2929

3030
Random 是 java 提供的一个伪随机数生成器。
3131

32-
生成 “min <= 随机数 <= max ” 的随机数:
32+
生成 “ min <= 随机数 <= max ” 的随机数:
3333

3434
```
3535
import java.util.Random;

‎contents/how-do-i-compare-strings-in-java.md

Copy file name to clipboardExpand all lines: contents/how-do-i-compare-strings-in-java.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ new String("test") == new String("test") // --> false
4040
```
4141

4242
###其他
43-
- 如何你重写了equal方法,记得相对应地修改hashcode方法,否则将会违反这两个方法的对等关系,如果两个对象是相等(equal)的,那么两个对象调用hashCode必须产生相同的整数结果,即:equal为true,hashCode必须为true,equal为false,hashCode也必须为false
44-
- 如果要忽略大小写进行对比,可以用equalsIgnoreCase()方法
43+
- 如果你重写了equal方法,记得相对应地修改hashcode方法,否则将会违反这两个方法的对等关系,如果两个对象是相等(equal)的,那么两个对象调用hashCode必须产生相同的整数结果,即:equal为true,hashCode必须为true,equal为false,hashCode也必须为false
44+
- 如果要忽略大小写进行对比,可以用equalsIgnoreCase()方法

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.