Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

"TRY AGAIN" Always shown after run my code

After i run my code it always shown TRY AGAIN* .
Howerver when i run my code in other java editor it shown Output.


// Java Program to Swap Two values using third variable
// using temp variable

// Importing generic libraries
import java.util.
;

class GFG {

// Function to swap two numbers
// Using temporary variable
static void swapValuesUsingThirdVariable(int m, int n)
{
// Swapping the values
int temp = m;
m = n;
n = temp;
System.out.println("Value of m is " + m
+ " and Value of n is " + n);
}

// Main driver code
public static void main(String[] args)
{
// Random integer values
int m = 9, n = 5;

// Calling above function to
// reverse the numbers
swapValuesUsingThirdVariable(m, n);
}
}
by

0 Answers

No Answer posted yet.

Login / Signup to Answer the Question.