> > Operator Logika

Operator Logika


public class OperatorLogika {
public static void main (String[] args){
int a = 20;

System.out.println("a = "+a);
System.out.println();
System.out.println("Logika And");
System.out.println("(a>10)&&(a<10) = "+((a>10)&&(a<10)));//false
System.out.println();
System.out.println("Logika Or");
System.out.println("(a>10)||(a<10) = "+((a>10)||(a<10)));//true

}
}

Leave a Reply

Powered by Blogger.