summaryrefslogtreecommitdiffhomepage
path: root/java.html.markdown
diff options
context:
space:
mode:
authorGeoff Liu <g@geoffliu.me>2015-03-16 14:25:46 -0600
committerGeoff Liu <g@geoffliu.me>2015-03-16 14:25:46 -0600
commit366fe47ffa32d257fdbb703d8ae25f6078450db5 (patch)
treeaa6e69071c1755a9dc4384c394f32018016f4429 /java.html.markdown
parent752279248e4950b5b702896edefec7af4f7ca001 (diff)
parenta6ea67e733d9ecede6c2d29d42a983ae4ffb4506 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'java.html.markdown')
-rw-r--r--java.html.markdown12
1 files changed, 6 insertions, 6 deletions
diff --git a/java.html.markdown b/java.html.markdown
index ebe11bd3..10dd498c 100644
--- a/java.html.markdown
+++ b/java.html.markdown
@@ -103,15 +103,15 @@ public class LearnJava {
// Arrays
//The array size must be decided upon instantiation
//The following formats work for declaring an array
- //<datatype> [] <var name> = new <datatype>[<array size>];
+ //<datatype>[] <var name> = new <datatype>[<array size>];
//<datatype> <var name>[] = new <datatype>[<array size>];
- int [] intArray = new int[10];
- String [] stringArray = new String[1];
- boolean boolArray [] = new boolean[100];
+ int[] intArray = new int[10];
+ String[] stringArray = new String[1];
+ boolean boolArray[] = new boolean[100];
// Another way to declare & initialize an array
- int [] y = {9000, 1000, 1337};
- String names [] = {"Bob", "John", "Fred", "Juan Pedro"};
+ int[] y = {9000, 1000, 1337};
+ String names[] = {"Bob", "John", "Fred", "Juan Pedro"};
boolean bools[] = new boolean[] {true, false, false};
// Indexing an array - Accessing an element