All pastes #740023 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-17 17:19 UTC
rendered paste body
import javax.swing.JFrame;
import javax.swing.JOptionPane;

public class TegnLikhet {

    public static boolean Likhet(char t1, char t2) {
        return !(t1 > t2 || t1 < t2);
    }

    public static void main(String[] args) {
        char t1 = args[0].charAt(0);
        char t2 = args[1].charAt(0);
        String resultat = "like";
        if (!Likhet(t1,t2)) {
            resultat = "u" + resultat;
        }
        JOptionPane.showMessageDialog(new JFrame(),"Tegnene er "+resultat+".");
    }
}