Last Input Code : Java

File Name (Without .java).

Last Output Code :


Online java to C# converter

This is a transpiler, which syntactically converts Java code to C# equivalent code. This is simplest and interactive code converter which is support java 8 packages.

How To Use This?


That is similar to compile java code in your local system. First put your java code inside input box and mention the file name (Which class is public and define main method).

The file name is important, because we first check whether your code is valid. If it is valid then the process of converting to Java -> C# works.

// Import package 
import java.util.ArrayList;
public class Demo
{
    public static void main(String[] arg)
    {
        ArrayList name = new ArrayList ();
        name.add("xyz");
        name.add("coc");
        System.out.print(name);
    }
}

Here ArrayList are not indicate initial type. So this tool indicate warning in this type of situation.

Note: java/Demo.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Solution of this problem use (@SuppressWarnings("unchecked")) at the top of class.


@SuppressWarnings("unchecked")
public class Demo
{
    public static void main(String[] arg)
    {
      // Your code here
    }
}

Note that this mechanism are avoid warnings. so try to provide valid type because it's difficult to convert generic code.

Initial this tool working on limited functionality which is directly converted into c#. But it is not enough all cases and some method are not converting into c# programming language. So kalki code include survey facility which is works on when package and method are not convert. And appears on the top of your input code. For example.

// Import package 
import java.lang.StringBuilder;
public class Demo
{
    public static void main(String[] arg)
    {
        StringBuilder str = new StringBuilder("App Get App");
        str.append(" This App is not work");
        int v = str.lastIndexOf("App");
        System.out.println(v);
    }
}

This tool not converted lastIndexOf of method so survey are display.

User Input

Limitations

This is support java 8 packages such as java.time, java.io,java.util etc. Its does not work custom or third party java packages.


This tool does not provide 100% accuracy. This is in initial stage which is similar to Java To Php Converter.


This tool is allows to 100 request to each user in every 12 hours. Which is calculated when your code is not produce any kind of error and warnings.


Generated code is produced by your given code so it must be valid java code which is define inside class. You can also define more than one class in single file.




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