January 09, 2019

Bit wise operator in java

/**
 *
 */
package com.hackerearth.basicprograming;

/**
 * @author I T Section Regional Office Kozhikode
 *
 */
public class LeftShiftOperator {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

int i = 2;
int j= i>>1;
int k =i<<1;
System.out.println(j);
System.out.println(k);

}

}

No comments:

Post a Comment

Your feedback may help others !!!

Facebook comments