Answers for "swap numbers without temp in java"

0

Swapping of two numbers in java with temporary variable

public class Main{public static void main(String[] args) {float a = 3.66f, b = 6.47f;System.out.println("a number " + a);System.out.println("b number " + b);float temp = a;a = b;b = temp;System.out.println("After swapping");System.out.println("a number " + a);System.out.println("b number " + b);}}
Posted by: Guest on June-12-2021

Code answers related to "swap numbers without temp in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language