Learn Java Training from the Best Tutors
Search in
Syntax: Java and C have different syntax styles. C has a more minimalistic and low-level syntax, while Java has a higher-level, object-oriented syntax. C uses curly braces to define code blocks, while Java uses curly braces for code blocks as well as for class and method definitions.
Memory Management: In C, memory management is primarily done manually using functions like malloc()
and free()
. This gives the programmer fine-grained control over memory allocation and deallocation. On the other hand, Java has automatic memory management through a process called garbage collection. The Java Virtual Machine (JVM) takes care of allocating and freeing memory, which simplifies memory management for the programmer.
Pointers: C allows direct manipulation of memory addresses using pointers. Pointers allow for more efficient memory access and low-level operations, but they also introduce the possibility of memory-related errors like segmentation faults. Java, on the other hand, does not have pointers in the same sense as C. It provides references to objects, but these references do not allow direct memory manipulation.
Platform Dependency: C is a low-level language that is often used for system programming and developing operating systems, device drivers, and embedded systems. C code is compiled into machine code specific to the target platform. Java, on the other hand, is designed to be platform-independent. Java code is compiled into bytecode that can run on any system with a compatible JVM.
Object-Oriented Programming: Java is an object-oriented programming language and enforces object-oriented principles. It provides features like classes, objects, inheritance, and polymorphism. C, on the other hand, is a procedural language that does not have built-in support for object-oriented programming. Although C can be used to write code in an object-oriented style, it requires manual implementation of OOP concepts.
Standard Library: Java has a comprehensive standard library that provides a wide range of built-in classes and APIs for various tasks, including networking, file I/O, database connectivity, and more. C has a minimal standard library that focuses primarily on basic functionality, and additional libraries need to be included for specific tasks.
Portability: Java programs are highly portable because they run on any system with a compatible JVM. Once a Java program is compiled into bytecode, it can be executed on any platform without the need for recompilation. C programs, on the other hand, need to be recompiled for each target platform due to their platform-specific nature.
View 1 more Answers
Related Questions
Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com
Ask a QuestionRecommended Articles
Top 5 Reasons to Learn JavaScript
Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...
Java: An Object-Oriented Language
Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”. Right from its first implication as java 1.0...
Why Java is the Most Popular Programming Language
Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...
Why Should You Learn Java !
Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...
Looking for Java Training Classes?
Learn from the Best Tutors on UrbanPro
Are you a Tutor or Training Institute?
Join UrbanPro Today to find students near youThe best tutors for Java Training Classes are on UrbanPro
The best Tutors for Java Training Classes are on UrbanPro