Interviewer And Interviewee Guide

Java Software Engineer Interview Question:

Tell us how can you swap the values of two numeric variables without using any other variables?

Submitted by: Muhammad
You can swap two values a and b without using any other variables as follows:

a = a + b;
b = a - b;
a = a - b;
Submitted by: Muhammad

Read Online Java Software Engineer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.