Solved

Bitwise exclusive or

Posted on 2014-02-04
2
120 Views
Last Modified: 2014-02-04
Hi:

A simple Java questions:

Please provide code to calculate 2^(3^(4^(5^6)))

Thanks

Sunnybrad
0
Comment
Question by:sunnybrad
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
Comment Utility
System.out.println(2^3^4^5^6);
0
 
LVL 15

Expert Comment

by:gplana
Comment Utility
I guess the ^ operator means and-bit operator. Try this code:

public class test{
    public static void main(String[] args){
      System.out.println(2&(3&(4&(5&6))));
   }
}

Open in new window

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How Complex Is This Java Course ? 9 62
strCount chalenge 3 50
Change to event 1 72
JList custom Cell Renderer refresh 15 39
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now