0
difference between java and C except object and procedural
This is a question that every new programmer want to know that what is the major difference between java and C except object and procedural oriented ????
3 Answers
+ 2
âą Besides OOP vs POP, a lot of the differences also apply to C++ and Java, so any differences you find between C++ and Java also apply to this.
âą C is also a lower level language than Java. You get a lot of control, but it also doesnât come with a built-in string structure or things like that.
+ 1
thanks all for giving your precious time
0
Java is a bit higher level language that compiles to bytecode and is designed to run in a virtual machine such as the JVM or Java Virtual Machine. This makes it more portable in the sense that you can "write once, run anywhere" with your code. It has many built in features and optimizations to make programming simpler such as a string type, utility methods for many classes, garbage collection, etc. But the benefits of this added simplicity, as always come with a cost. Less control.
C is a very similar language syntactically but doesn't have a primitive type for strings, garbage collection, or quite as much extra functionality for things like treating an array as a stack data structure, or getting the size of some string with a built-in method. At first glance it seems that C would be less useful potentially or at least harder to use, but these downsides come with great benefit. C gives the programmer very fine control of memory usage and it provides low-level performance where Java does not. C is also compiled to machine code rather than to an intermediate "bytecode" so it's even faster. This is why it is often used for microcontrollers and operating systems. But there's a trade-off.. Although C is faster by itself, it leaves performance up to the skill of the programmer where Java let's you do stupid things and finds out how to improve it for you, essentially.
There are many other notable aspects I will not go into here but in the end it depends what you're looking for. They both have their own place and it's up to you to decide the trade-off you want to take.