theclapp

Search theclapp.blog-city.com

 

Chapter 4, exercise 2, Java version

posted Friday, 10-Jan-2003
17:10 -- starting 4.2, Java version
17:12 -- done
---
// ch04_ex02.java

import java.util.*;

class ch04_ex02 {
ch04_ex02() {
System.out.println( "Creating a ch04_ex02" );
}
ch04_ex02(String s) {
System.out.println( "Creating a ch04_ex02: " + s );
}

public static void main( String[] args ) {
ch04_ex02 o = new ch04_ex02( "... not really ;)" );
}
}
---

17:14 -- starting Lisp version
17:16 -- stopping. As I mentioned for 4.1, Lisp doesn't really have a constructor idea in the same way Java does, so I'll have to think further about how (and why, and if) one might want to do something like this in CLOS, and how it might look.

Also have to shower 'cause my wife will probably get home soon. :)

links: digg this    del.icio.us    technorati    reddit