Online Java Escape Unescape

Input data
bfotool loadding
Output data
bfotool loadding

Java Escape Unescape tool helps you to escape and Unescape Java string when you want to output the Java directly not interpreted by browser.

How to Escape/ Unescape Java?

  • To Escape/ Unescape your Java data add/ copy and paste the Java data into the input.
  • You can also load the Java data from the url by clicking the  button or load the Java data from the computer by clicking the  button.
  • Click the 'Escape' or 'Unescape' button to process the data.
  • Once conversion is done you can download the file by clicking the  button.

Input Data

public static void main(String[] args) {
	System.out.println("length array: ");
	Scanner sn = new Scanner(System.in);
	int n = sn.nextInt();
	int[] a = new int[n];
	for (int i = 0; i < n; i++) {
		System.out.println("Enter a[" + i + "]:");
		a[i] = sn.nextInt();
	}
	
	System.out.println("");
	for (int i = 0; i < n ; i++) {
		System.out.print(a[i] + " ");
	}
	 System.out.println("");
	int j = 0;
	for (int i = 0; i < n / 2; i++) {
		if (a[i] == a[n - 1 - i]) {
			j++;
		}
	}
	if (j == n/2) {
		System.out.println("Array");
	} else {
		System.out.println("Array");
	}
}

After Escape

public static void main(String[] args) {\r\n        System.out.println(\"length array: \");\r\n        Scanner sn = new Scanner(System.in);\r\n        int n = sn.nextInt();\r\n        int[] a = new int[n];\r\n        for (int i = 0; i < n; i++) {\r\n            System.out.println(\"Enter a[\" + i + \"]:\");\r\n            a[i] = sn.nextInt();\r\n        }\r\n        \r\n        System.out.println(\"\");\r\n        for (int i = 0; i < n ; i++) {\r\n            System.out.print(a[i] + \" \");\r\n        }\r\n         System.out.println(\"\");\r\n        int j = 0;\r\n        for (int i = 0; i < n / 2; i++) {\r\n            if (a[i] == a[n - 1 - i]) {\r\n                j++;\r\n            }\r\n        }\r\n        if (j == n/2) {\r\n            System.out.println(\"Array\");\r\n        } else {\r\n            System.out.println(\"Array\");\r\n        }\r\n    }