Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match_all(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 834

Warning: Invalid argument supplied for foreach() in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 835

Warning: preg_replace(): Compilation failed: group name must start with a non-digit at offset 4 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 839

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860

Warning: preg_match(): Compilation failed: group name must start with a non-digit at offset 8 in /home/e5m7uo8vro0d/public_html/mediawiki/includes/MagicWord.php on line 860
The Knowledge Of Sauron's Minions - Huben's Wiki

The Knowledge Of Sauron's Minions

From Huben's Wiki
Jump to: navigation, search
(Multitudinous Variables)
Line 1: Line 1:
 
Welcome to Rivendell!  You have completed your stay at Hogwarts and have come here to study Java even further, to learn the dark secrets of Sauron.
 
Welcome to Rivendell!  You have completed your stay at Hogwarts and have come here to study Java even further, to learn the dark secrets of Sauron.
  
==Revealing The Knowledge==
+
==(A) Revealing The Knowledge==
 
[[File:Robert As Gandalf.jpg|thumb|Gandalf speaking here...]]
 
[[File:Robert As Gandalf.jpg|thumb|Gandalf speaking here...]]
 
Sauron knows whatever his servants, the RingWraiths, know, thus it is essential to learn of the types of knowledge RingWraiths and other fell classes can possess.
 
Sauron knows whatever his servants, the RingWraiths, know, thus it is essential to learn of the types of knowledge RingWraiths and other fell classes can possess.
Line 41: Line 41:
 
Type '''String''' is not a basic type: it is a '''class''' and variables of type String are called '''objects'''.  String is one of the important classes that come with Java, and one of the most frequently used classes.
 
Type '''String''' is not a basic type: it is a '''class''' and variables of type String are called '''objects'''.  String is one of the important classes that come with Java, and one of the most frequently used classes.
  
==Further Revellations==
+
==(B) Further Revellations==
  
 
# Trap the RingWraith code within Dr. Java.
 
# Trap the RingWraith code within Dr. Java.
Line 56: Line 56:
 
# The exception is boolean: '''true''' and '''false''' are reserved words.
 
# The exception is boolean: '''true''' and '''false''' are reserved words.
  
==The Arcane Knowledge==
+
==(C) The Arcane Knowledge==
 
# Add another variable to RingWraith, of type double and named "compute".
 
# Add another variable to RingWraith, of type double and named "compute".
 
# Inside main(), add 'compute = Math.sin(Math.PI/6);'
 
# Inside main(), add 'compute = Math.sin(Math.PI/6);'
Line 62: Line 62:
 
# Look on my page for "References", and click on Math.  Explore therein and find the secrets of exponentiation and other precalculus functions.
 
# Look on my page for "References", and click on Math.  Explore therein and find the secrets of exponentiation and other precalculus functions.
  
==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 'int[] anArray = {8, 2, 5};' to the variables at the top of RingWraith.
Line 74: Line 74:
 
# Add another value to the array by putting another number within the curly braces.
 
# Add another value to the array by putting another number within the curly braces.
 
# Change one of the array values by adding this line in main(): 'anArray[1] = -3;'.  Can you write a set of println() to show all the array values, and see which has changed?
 
# Change one of the array values by adding this line in main(): 'anArray[1] = -3;'.  Can you write a set of println() to show all the array values, and see which has changed?
 +
# Look ye at the signature of main().  Where is the array in it?  What is it an array of?

Revision as of 09:36, 25 September 2012

Personal tools
translate