ICT 214 Tutorial Week 4

  1. Write a program to store the numbers 1, 3, 5, 7, ..., 101 in an array and then sum all the elements of the array and print the sum.
  2. Write a program to read strings from the console, and then print them out in reverse order.
  3. Write a program to read integers from the keyboard, use bubble sort to order them, and print out the ordered list.
  4. The method getAddress() of InetAddress returns an array of 4 elements, each a byte of the address. Modify the program GetInetInfo.java to print these 4 bytes.

Jan Newmarch (http://jan.newmarch.name)
Last modified: Mon Mar 3 21:43:11 EST 2008
Copyright ©Jan Newmarch