Bit Wise AND Operation

import java.util.Scanner; public class Bitwise_AND { public static void main(String[] args) { System.out.println("Show casing Bit wise AND."); System.out.print("Enter the first number: "); Scanner Input = new Scanner(System.in); int first = Input.nextInt(); System.out.print("Enter the second number :"); int second = Input.nextInt(); int result = first & second; System.out.println("Result is ="+result); } }

Mar 1, 2025 - 18:47
 0
Bit Wise AND Operation

import java.util.Scanner;

public class Bitwise_AND {
public static void main(String[] args) {

    System.out.println("Show casing Bit wise AND.");

    System.out.print("Enter the first number: ");
    Scanner Input = new Scanner(System.in);
    int first = Input.nextInt();
    System.out.print("Enter the second number :");
    int second = Input.nextInt();

    int result = first & second;
    System.out.println("Result is ="+result);
}

}