@@ -148,7 +148,7 @@ Now lets look at the same program written in Java:
148148.. highlight :: java
149149 :linenothreshold: 4
150150
151- .. livecode :: hellojava
151+ .. activecode :: hellojava
152152 :language: java
153153 :sourcefile: Hello.java
154154
@@ -425,7 +425,7 @@ temperature to Celsius.
425425
426426Next, lets look at the Java Equivalent.
427427
428- .. livecode :: convert1
428+ .. activecode :: convert1
429429 :language: java
430430 :sourcefile: TempConv.java
431431 :stdin: 212
@@ -611,7 +611,7 @@ more of a user interface to them than reading and writing from the
611611command line. Lets look at a version of our temperature control
612612application that uses dialog boxes for input and output.
613613
614- .. livecode :: swing
614+ .. activecode :: swing
615615 :language: java
616616 :sourcefile: TempConvGUI.java
617617
757757
758758Here is the Java code needed to write the exact same program:
759759
760- .. livecode :: histojava
760+ .. activecode :: histojava
761761 :language: java
762762 :sourcefile: Histo.java
763763 :datafile: test.dat
@@ -936,7 +936,7 @@ of something called arrays. In fact you have already seen one example of
936936an array declared in the ‘Hello World’ program. Lets rewrite this
937937program to use primitive arrays rather than array lists.
938938
939- .. livecode :: primarrays
939+ .. activecode :: primarrays
940940 :language: java
941941 :sourcefile: HistoArray.java
942942 :datafile: test.dat
@@ -1034,7 +1034,7 @@ for this job could look like this:
10341034Notice that the structure of the program is very similar to the numeric
10351035histogram program.
10361036
1037- .. livecode :: dictjava
1037+ .. activecode :: dictjava
10381038 :language: java
10391039 :sourcefile: HistoMap.java
10401040 :datafile: alice30.txt
@@ -1166,7 +1166,7 @@ simple example in both Python and Java.
11661166
11671167In Java we have a couple of ways to write this
11681168
1169- .. livecode :: javaelif
1169+ .. activecode :: javaelif
11701170 :language: java
11711171 :sourcefile: ElseIf.java
11721172
@@ -1199,7 +1199,7 @@ Java rule that a single statement does not need to be enclosed in curly
11991199braces. Since the if is the only statement used in each else we can get
12001200away with the following.
12011201
1202- .. livecode :: javaelif2
1202+ .. activecode :: javaelif2
12031203 :language: java
12041204 :sourcefile: ElseIf.java
12051205
@@ -1225,7 +1225,7 @@ Java also supports a ``switch`` statement that acts something like the
12251225elif statement of Python under certain conditions. To write the grade
12261226program using a switch statement we would use the following:
12271227
1228- .. livecode :: javaswitch
1228+ .. activecode :: javaswitch
12291229 :language: java
12301230 :sourcefile: SwitchUp.java
12311231
@@ -1672,7 +1672,7 @@ Our full Fraction class to this point would look like the following. You
16721672may want to try to compile and run the short test program provided just
16731673to see what happens.
16741674
1675- .. livecode :: fraction1
1675+ .. activecode :: fraction1
16761676 :language: java
16771677 :sourcefile: Fraction.java
16781678
@@ -2020,7 +2020,7 @@ this as follows:
20202020
20212021In Java we would write this same example using a static declaration.
20222022
2023- .. livecode :: studentclass
2023+ .. activecode :: studentclass
20242024 :language: java
20252025 :sourcefile: Student.java
20262026
@@ -2080,7 +2080,7 @@ Full Implementation of the Fraction Class
20802080A final version of the Fraction class that exercises all of the features
20812081we have discussed is as follows.
20822082
2083- .. livecode :: fullfraction
2083+ .. activecode :: fullfraction
20842084 :language: java
20852085 :sourcefile: Fraction.java
20862086
0 commit comments