UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

What is difference between Java and C?

Asked by Last Modified  

3 Answers

Learn Java

Follow 1
Answer

Please enter your answer

Python trainer believe in practical learning.

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...
read more
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

read less
Comments

Java is advanced and high level language .C is only compiled and not interpreted. Java is both compiled and interpreted.
Comments

Computer science teacher

JAVA IS OOPS PROGRAMING RATHER C IS NOT SUPPORT OOPS.
Comments

View 1 more Answers

Related Questions

Why Java is platform independent?
Once your java code compiled, compiled code(.class) can be executed on any os platform...if your question is HOW..it is interesting which deals with bytecode conversation
Sunita
Need to do java core and advanced certificate. Which books or pdf is need to refer?
Head First series of books on core java and advance java is good. Also Kathy serra scjp book, Khalid mughal scjp book is good for core java.
Prashanth
What are the best websites to learn java as well as get a certificate from them?
To learn basic java i suggest javatpoint is good for knowledge as well as concept but for certification refer book
Abirami
0 0
7
What is the best book to learn data structures using Java?
There are several excellent books that can help you learn data structures using Java. 1. "Data Structures and Algorithms in Java" by Robert Lafore. 2. "Algorithms, Part I" by Robert Sedgewick and Kevin...
Shubham
0 0
5
Please tell me what Object Oriented Programming and Object Based Programming with reallife example..what is the difference between them.?
Hi Ritesh, In order to be a true object oriented programming language, following 4 need to be present… 1) Abstraction - Hiding the implementation details from the user, only the functionality will...
Ritesh

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Java Overview
Java platform overview Java platform components The Java platform consists of the following components. The Java language Like any programming language, the Java language has its own structure, syntax...
A

Akshay Shende

0 0
0

What Would Be Life Cycle Of A Fresher After Campus In An IT Company?
1. Basic Technical Training: Since freshers are not subject matter experts so gone through 3 - 6 months basic technical training within Organization. 2. Technical Assessment: HR sends freshers to various...

Definition of Class and Object in Java
Object - Objects have states and behaviors. Example: A dog has states - colour, name, breed as well as behaviors - barking, eating, sleeping. An object is an instance of a class. Class - A class can be...

What are the JSP implicit objects ?
JSP provides Nine implicit objects by default. They are as follows with corresponding Object Type: i) out --> JspWriter ii) request -->HttpServletRequest iii) response --> HttpServletResponse iv)...

Big Data Hadoop Training
What is Big Data? Big data means really a big data, it is a collection of large datasets that cannot be processed using traditional computing techniques. Big data is not merely a data, rather it has become...

Recommended Articles

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...

Read full article >

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...

Read full article >

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...

Read full article >

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...

Read full article >

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 you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more