summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-02-15 10:29:42 -0800
committerSenthil Kumaran <senthil@uthcode.com>2016-02-15 10:29:42 -0800
commitb02cceda8b6f63ee133c5c88cd31e16fe346c4a6 (patch)
tree087b9a2240a3e49615fa10b2d76159df68a4ecb6
parent712c9f342ff054039bd8e93a43be6ea0846ebc83 (diff)
new boolean[] not really required when initializing.
Introducing this disrupts the flow a little bit to think, if specifying `new boolean[] ` required when intializing.
-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]);