Posts

Showing posts from July, 2015

Java is Javascript (with demonstration and files)

Image
Yes it's true, i can show you that is actually true.
JavaScript and Java are the same thing.
This will demonstrate that I'm not joking.



Yes, it's the same thing, so STOP saying that Java is NOT JavaScript.

These are the files i used to build that! [ZIP] JavaJS.zip

OK OK, I'm joking. I just abused the jar (aka zip) file format. yes it's a valid Java because i compiled it with javac and it's a valid JavaScript because it's a valid html, but the truth is they are not the same thing.
I appended the jar to the html and since the ZIP has his header in the bottom (at the end of the file for historic reasons), it will be seen as valid by both. Java will only read the vaild jar and the browser the valid html.
This can be used just for fun between friends/programmers. The Truth