πŸ“Š JAVA
Q. What will be the output of the following Java program?
Code:
class leftshift_operator 
{
    public static void main(String args[]) 
    {        
         byte x = 64;
         int i;
         byte y; 
         i = x << 2;
         y = (byte) (x << 2)
         System.out.print(i + " " + y);
    } 
}
  • (A) 0 64
  • (B) 64 0
  • (C) 0 256
  • (D) 256 0
πŸ’¬ Discuss
βœ… Correct Answer: (D) 256 0

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
190
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Kiran Rapria
Publisher
πŸ“ˆ
86%
Success Rate