summaryrefslogtreecommitdiffhomepage
path: root/java.html.markdown
diff options
context:
space:
mode:
authorArnie97 <arnie97@gmail.com>2015-04-11 13:09:50 +0800
committerArnie97 <arnie97@gmail.com>2015-04-11 13:09:50 +0800
commitc7f085ee34ebce89e523b10a56f9f6d5b1e4cd3a (patch)
tree7739ad481e099b59dd0393c61e898c51c35f9356 /java.html.markdown
parentc38d8d93135561e8c0afbe20a5b16b39917ee06c (diff)
parentf0540b93b16311ca39cf4f0ad5a9abf8dc13f223 (diff)
Merge pull request #1 from adambard/master
Fetch updates from upstream
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