+ 2

why c is used to develop operating systems like in linux ,why not java?? java is secured than c..but why not java ??

7th Jun 2017, 7:54 PM
Anjaneyulu Bairi
5 Réponses
+ 8
If this question is serious, then consider the vast syntactical difference. Java doesn't support full manual memory management while in C it's mandatory. Java is a pure OO language where even the start is a method within a class. Ultimately, languages are unravelled into very basic CPU instructions. Java relies on a virtual platform (which is why it's agnostic and runs on Linux/Mac/Win/BSD & co). The code syntax itself was not designed with the same needs as C. C was a step up from ASM (pneumonics for CPU instructions). C was a portable solution to many problems. Because of its design, its simplicity, and its lack of abstraction, there's no such thing as security issues, only poorly written code. Java, if compiled to something other than JVM bytecode would be open to any number of "quirks" based on how the compiler handled things, especially memory. Remember Java has built-in garbage collection, C does not. Java applications can become very secure with the correct privilege control over them and JVM, but this is where one has to look at language vs runtime. Languages in general aren't any more secure than the coder and compiler, but ones like Java are unsuitable on the level of the language itself. Then there's dozens of other issues like the bloat generated by such. C is designed to translate nicely into machine code. Java only seems secure because of memory management and the ability to confine the JVM itself. A CompSci student could probably word it better, but hopefully I've explained okay.
8th Jun 2017, 12:10 PM
Jamie
Jamie - avatar
+ 3
This is a joke, right?
7th Jun 2017, 10:57 PM
Jamie
Jamie - avatar
+ 2
not joke friend @jamie
8th Jun 2017, 1:42 AM
Anjaneyulu Bairi
+ 2
C is mostly used because its closer to the "metal"(machine) than Java...
8th Jun 2017, 8:50 PM
Phillip Anekwe 🇳🇬⚡
Phillip Anekwe 🇳🇬⚡ - avatar