Skip to content
Snippets Groups Projects
Commit af9071f5 authored by Vesa Lappalainen's avatar Vesa Lappalainen :bicyclist:
Browse files

live16 korjattu

parent c4d4c9ae
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ public class Taulukko {
* @param arvo uusi arvo
* @throws IndexOutOfBoundsException jos väärä paikka
*/
public void set(int i, int arvo) throws IndexOutOfBoundsException {
public void set(int i, double arvo) throws IndexOutOfBoundsException {
if ((i < 0) || (lkm <= i)) throw new IndexOutOfBoundsException("set i = " + i + ": " + arvo);
alkiot[i] = arvo;
}
......
......@@ -110,7 +110,7 @@ public class Taulukko<TYPE> {
luvut.set(1,4);
System.out.println(luvut.toString());
double luku = luvut.get(2);
Integer luku = luvut.get(2);
System.out.println(luku);
// luvut.set(21, 4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment