program java untuk mencari relasi dalam program java

operator relasi
operator relasi membandingkan dua nilai dan menentukan hubungan  diantara nilai-nilai tersebut.

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author satudi
 */
public class LAT3_RELASI {
   
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int a=62;
        int b=67;
        double x=12.3;
        double y=1.5;
        System.out.println("Variable");
        System.out.println("Nilai a=" +a);
        System.out.println("Nilai b=" +b);
        System.out.println("Nilai x=" +x);
        System.out.println("Nilai y=" +y);
        System.out.println("a+b<x+y =" +(a+b<x+y));//false
        System.out.println("a<b=" +(a<b));//true
        System.out.println("x>y=" +(x>y));//true
}
}


EmoticonEmoticon