Java to python converter

This is simple basic alpha version of Java to Python code converter. The main goal of this tool is to provide functionality to deal with converting custom Java code into equivalent Python code.

RECORD

We are displaying some records. Which have been tested by the student developer and global programmers. You can take those examples to test our tool.

S NoFileNameCode
1Test.javapackage com.problems; import java.util.HashMap; import java.util.Map; class FindPair { public s...
2Test.javaclass Main { public static void main(String[] args) { int n = 5; // for loop for (i...
3Test.java// Tested Code class Test { public static void main(String[] args) { System.out...
4Test.javaclass Main { public static void main(String[] args) { int number = 44; String size; ...
5Test.javaimport java.util.*; class Main { public static void main(String[] args) { Scanner ky = new Sca...
6Test.javaclass FactorialNumber { public static void main(String[] args) { int i = 1; int fact = 1; int...
7Test.javaclass PalindromeNumber { public static void main(String[] args) { int r = 0; int sum = 0; int...
8Test.java// Tested Code class PalindromeNumber { public static void main(String[] args) { int r = 0; int...
9Test.java// Tested Code class Test { public static void main(String[] args) { for(int i=1;i>10...
10Test.java// Tested Code class Test { public static void main(String[] args) { for(int i=1;i>10...
S NoFileNameCode
    Showing 1 to 10 of 21906 entries.

Comment

Please share your knowledge to improve code and content standard. Also submit your doubts, and test case. We improve by your feedback. We will try to resolve your query as soon as possible.

New Comment







>:(     12 Day ago
this program is dumb andruins your javascript please dont use this https://github.com/chrishumphreys/p2 
instead use this convert that can actual transfer in between files, 
(only under the "(..)" rule anything other would be invalid.
Kalkiteam     49 Day ago
It is capable, but it is designed to work with a single file to reduce the load on the server. If you use more than one file it will take more time. 
John     50 Day ago
Seriously? This can't handle dependence between files?
John     50 Day ago
Seriously? This can't handle dependence between files?
Kalkiteam     52 Day ago
It is very important to test for syntax errors, which detect valid code, before starting to convert the code. This is done so that your code can be changed without interruption.
By : kalkicode@gmail.com
Nag     53 Day ago
Why do you compile the java class when converting in to python. How can you expect all import packages are available to you.
Pp021     106 Day ago
// file : XORCrypt
public class XORCrypt {
	private static String key = "o23sSendevia";

	public static String encrypt(String str) {
		int[] output = new int[str.length()];
		for (int i = 0; i < str.length(); i++) {
			int o = (Integer.valueOf(str.charAt(i)) ^ Integer.valueOf(key.charAt(i % (key.length() - 1)))) + '0';
			output[i] = o;
		}
		String out = "";
		for (int enc : output) {
			out += enc + "'";
		}
		return out.substring(0, out.length() - 1);
	}

	public static String decrypt(String input) {
		String output = "";
		String[] str_split = input.split("'");
		int[] split = new int[str_split.length];
		for (int i = 0; i < str_split.length; i++) {
			try {
				split[i] = Integer.parseInt(str_split[i]);
			} catch (NumberFormatException e) {
				new RuntimeException(input, e);
				return input;
			}
        }
		
		for (int i = 0; i < split.length; i++) {
			output += (char) ((split[i] - 48) ^ (int) key.charAt(i % (key.length() - 1)));
		}
		return output;
	}
}
// Write note here
on decrypt method it has same variable on the loop please fix :)
take some min to fix the code but still useful