The Knowledge Of Sauron's Minions
From Huben's Wiki
(→(D) Multitudinous Variables) |
|||
Line 64: | Line 64: | ||
==(D) Multitudinous Variables== | ==(D) Multitudinous Variables== | ||
As yet we have examined only singular variables. In mathematical lore, we often use variables that contain multitudes, as in matrices. In Java, we have row matrices, called '''arrays'''. Arrays can be of any type. We specify an array of a type by placing square brackets '[]' after the type. | As yet we have examined only singular variables. In mathematical lore, we often use variables that contain multitudes, as in matrices. In Java, we have row matrices, called '''arrays'''. Arrays can be of any type. We specify an array of a type by placing square brackets '[]' after the type. | ||
− | * Add 'int[] anArray = {8, 2, 5};' to the variables at the top of RingWraith. | + | * Add 'static public int[] anArray = {8, 2, 5};' to the variables at the top of RingWraith. |
In math, we would express this as: | In math, we would express this as: | ||