Week 1 Questions
From: Hudson, Nick
Sent: 16 May 2003 04:29 PM
To: IOSG
Subject: Java first steps
Hi
As Carl mentioned, I aim to use the opportunity of Friday meetings to provide
an introduction to Java, next Friday seems a reasonable time to begin.
For those who are interested, I think it would be useful if you could have a
go at as many of the following tasks as you want to:
1. get hold of the Java Developer's Kit and install it on a PC (or VMS or UNIX)
2. write a program that you can then build which when run displays "hello, world"
e.g.
> java firstprog
hello, world
3. write a program that takes an arbitrary number of parameters from the
command line and displays them in ascending order, e.g.
> java sorter nick sennen stuart bob carl julian mark alan paul ian martin
alan
bob
carl
ian
julian
mark
martin
nick
paul
sennen
stuart
4. put your program in a JAR file that runs when you use the command
> java -jar myjarfile nick sennen ...
There are two rules:
1. You aren't allowed to use an IDE (e.g. JBuilder). You've got to use the
JDK (but you can use a machine other than a PC if you want, e.g. VMS or UNIX)
2. You can use any resources (www, books) you want, but you're NOT allowed to
ask anyone for help.
It doesn't matter if you don't finish all or any of these, but I hope that this
may make you struggle a bit: in my experience that's the best way to learn.
I don't intend to judge or mark these, but if you have a go then
perhaps it will give you an idea of questions to bring along next week.
Have fun!
nick
Back to index page