Straight Java. No conditional compilation
- By Matt Brenner
- February 5, 2001
Lab Notes™
Conditional compilation in Java
Matt Brenner
Listing 1. Straight Java. No conditional compilation.
1 public class X extends Y
2 {
3 private int x_,
4 y_,
5 z_;
6
7 .
8 .
9 .
10
11 public String
12 toString()
13 {
14 StringBuffer text;
15
16
17 text = new StringBuffer();
18 text.append (super.toString());
19 text.append ("----- X -----\n");
20 text.append ("x: " + x_ + "\n");
21 text.append ("y: " + y_ + "\n");
22 text.append ("z: " + z_ + "\n");
23
24 return (text.toString());
25 }
26 }