online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
public class Main { public static int[] sortArrayByParity(int[] nums) { int odd = 1; for (int even = 0; even < nums.length; even += 2) { if (nums[even]%2==1) { while (nums[odd]%2==1) odd += 2; int t = nums[odd]; nums[odd] = nums[even]; nums[even] = t; } } return nums; } public static void main(String[] args) { int[] nums = {3,6,5,1,4,2}; int[] n2 = sortArrayByParity(nums); for (int x: nums) {System.out.println(x);} } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue