Class Taulukko

java.lang.Object
  extended by Taulukko

public class Taulukko
extends java.lang.Object

Esimerkki dynaamisesta taulukosta

Version:
1.0, 02.03.2002
Author:
Vesa Lappalainen

Nested Class Summary
 class Taulukko.TaulukkoTaysiException
           
 
Field Summary
private  int[] alkiot
           
private  int lkm
           
 
Constructor Summary
Taulukko()
           
Taulukko(int koko)
           
 
Method Summary
 int get(int i)
           
 void lisaa(int i)
           
static void main(java.lang.String[] args)
           
 void set(int i, int luku)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alkiot

private int[] alkiot

lkm

private int lkm
Constructor Detail

Taulukko

public Taulukko()

Taulukko

public Taulukko(int koko)
Method Detail

lisaa

public void lisaa(int i)
           throws Taulukko.TaulukkoTaysiException
Throws:
Taulukko.TaulukkoTaysiException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

set

public void set(int i,
                int luku)
         throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

get

public int get(int i)
        throws java.lang.IndexOutOfBoundsException
Throws:
java.lang.IndexOutOfBoundsException

main

public static void main(java.lang.String[] args)