[Solved] How to Implement class Alkio? [closed]
Why do you expect it to print (1,2,10)? You re-set the values to 2,5, 12 (eka.setAlkio(2, 5, 12);). (although, as commented to the question by @flesk, you don’t actually set them…) you didn’t override the toString method as you should have: public String toString(){ return “(“+rivi+”,”+sarake+”,”+arvo+”)”; } In your constructor, you don’t set the class … Read more