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

What is meant by Java full stack and angular Java?

Fullstack development means the combination of UI technologies (client-side) + Backend technology (server-side). UI technology like Angular or ReactJs (Front end technologies). It's all about client-side...
Anuradha
Can we use pointer in java?
No, we can't. Java has reference variables which contains address of objects. The reference variables are substitute to pointers in java. But, we cannot perform mathematical operations on reference variables...
Manish
What are the topics covered under core Java?
The major topics are listed below: 1. Java Basics - Variables, Data types, Operators, Control Statements,Strings, Arrays and Functions. 2. Object Oriented Concepts - Classes, Objects, Constructors, Inheritance,...
Sahil
0 0
6

 I want to learn from beginning, please tell me what is the best source to learn (core java)

hi sunaini It is very good that you want to learn programming... I would recommend you c,c++,java and dotnet courses...for becoming a good provrammer.. we provide online training..at lowest prices if...
Sunaini

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

Ask a Question

Related Lessons

Inheritance In Java
Inheritance: The process of getting properties and behaviors from one class to another class is called inheritance. Properties: Variables Behaviors: Methods The main purpose of the inheritance...
D

Deleted U.

1 0
0


Java: A Quick Overview
Not purely Object Oriented: It doesn't support multiple inheritence, it supports primitive data types and static members. Doesn’t support multiple inheritance: Reason is diamond problem i.e.,...

4 Things Every Tech Startup Needs to Know About The Coaching Industry
Knowledge on any subject is widely available to those who wish to learn. However, just gathering knowledge from other people doesn’t guarantee results in business. Results come from applying what...

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

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