summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeoff Liu <cangming.liu@gmail.com>2016-02-15 14:21:25 -0500
committerGeoff Liu <cangming.liu@gmail.com>2016-02-15 14:21:25 -0500
commitd40a48f29ad8839eb65b393052ff830f503435e4 (patch)
treee0f7dba03943b735aeef77eba2aab1b040669447
parent7b15495a061f0c0e9f2dba8bf4d12e732e34709d (diff)
parentb02cceda8b6f63ee133c5c88cd31e16fe346c4a6 (diff)
Merge pull request #2135 from orsenthil/patch-1
new boolean[] not really required when initializing.
-rw-r--r--java.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/java.html.markdown b/java.html.markdown
index 073135c9..50629ce1 100644
--- a/java.html.markdown
+++ b/java.html.markdown
@@ -175,7 +175,7 @@ public class LearnJava {
// Another way to declare & initialize an array
int[] y = {9000, 1000, 1337};
String names[] = {"Bob", "John", "Fred", "Juan Pedro"};
- boolean bools[] = new boolean[] {true, false, false};
+ boolean bools[] = {true, false, false};
// Indexing an array - Accessing an element
System.out.println("intArray @ 0: " + intArray[0]);