mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 18:11:38 +00:00
Merge pull request #2135 from orsenthil/patch-1
new boolean[] not really required when initializing.
This commit is contained in:
commit
d40a48f29a
@ -175,7 +175,7 @@ public class LearnJava {
|
|||||||
// Another way to declare & initialize an array
|
// Another way to declare & initialize an array
|
||||||
int[] y = {9000, 1000, 1337};
|
int[] y = {9000, 1000, 1337};
|
||||||
String names[] = {"Bob", "John", "Fred", "Juan Pedro"};
|
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
|
// Indexing an array - Accessing an element
|
||||||
System.out.println("intArray @ 0: " + intArray[0]);
|
System.out.println("intArray @ 0: " + intArray[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user