Friday, February 20, 2009

Simple byte comparison example



package datatypes;

public class ByteCompare {


public static void main(String[] args) {
byte i=22,j=33;
System.out.println(" is i < j " + (i<j));
//i <j returns boolean values true or false
// C language the same operator returns 0 or 1
}

}

output:
is i < j true


0 comments:

Post a Comment