0
Convert?
Is there a way to convert JavaScript to Java? My teacher showed me a code in JavaScript and said I have to convert it into Java. I know both are different and maybe somewhat similar ( maybe Iâm not 100% sure-) Also is there a website I can all of the commands(?) of code for Java and JavaScript so I can compare the two side by side to convert?
3 Answers
+ 6
Javascript and Java are very different from each other. I doubt that there is a "converter" that safely translates the code.
If the code is basic, it should be possible to rewrite it in Java.
+ 4
jsweet
A transpiler from Java to TypeScript/JavaScript
http://www.jsweet.org
Telerik Code Converter C# to VB and VB to C#
https://converter.telerik.com
Keep learning & happy coding :D
+ 3
Your teacher probably meant that you should write a code in java that does the same as his javascript code. That basically involves two steps:
1. Abstract from the Javascript code to the logic.
2. Implement the logic in java code.