Bitwise exclusive or

Posted on 2014-02-04
Last Modified: 2014-02-04

A simple Java questions:

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


Question by:sunnybrad
LVL 84

Accepted Solution

ozo earned 500 total points
ID: 39833814
LVL 15

Expert Comment

ID: 39833838
I guess the ^ operator means and-bit operator. Try this code:

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

Open in new window


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
couple of eclipse 5 46
mysql jsp example issue 32 51
CSV file parsing thru Java 13 34
Java basic valueOf question 1 29
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

830 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