Terning - Objektorienteret programmering i Java
Terning - Objektorienteret programmering i Java
Terning - Objektorienteret programmering i Java
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
public class Snydespil1<br />
{<br />
public static void main(String[] arg)<br />
{<br />
<strong>Terning</strong> t1 = new <strong>Terning</strong>();<br />
Falsk<strong>Terning</strong>1 t2 = new Falsk<strong>Terning</strong>1();<br />
}<br />
}<br />
t1: 1<br />
t2: 3<br />
t1=1 t2=5<br />
t1=1 t2=6<br />
t1=4 t2=3<br />
t1=6 t2=6<br />
To ens!<br />
t1=2 t2=6}<br />
System.out.println("t1: "+t1);<br />
System.out.println("t2: "+t2);<br />
Falske terninger<br />
for (int i=0; i