Eksami spikker
g.fillRect((j * 40), (m * 40) - 20, 20, 20); }}}}}}
________________________________________________________
public void actionPerformed(ActionEvent e) {
nupp = 1;n++;drawpanel.repaint();}});
public void paintComponent(Graphics g) {
if (nupp == 1) {for (int i = 0; i < n; i++)
g.drawLine(n * 2, i, n * 2, i);}}
________________________________________________________
public class mituon {public static void main(String[] args) {
String sona = args[0]; int pikkus, taht, taht2, kontroll = 0;
String vastus = ""; pikkus = sona.length();
for (int i = 0; i < pikkus - 1; i++) { taht = sona.charAt(i);
taht2 = sona.substring(i + 1, pikkus - 1).indexOf((char) taht);
if (taht2 >= 0 && vastus.indexOf((char) taht) < 0) {
vastus = vastus + (char) taht; kontroll = 1;}}
if (kontroll == 1) System.out.println("Jah " + vastus);
else System.out.println("Ei");} }
_______________________________________________________
public class sonad {public static void main(String[] args) {