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

Hi, Can anyone help me on below queries? 1. What makes a class as "Thread safe class" ? 2. equals() method uses 3. Difference between String vs StringBuffer ?
There are three ways to construct thread-safe Java class which has some state: 1. Make it truly immutable 2.Make field volatile. 3.Use a synchronized block
Saurav
How do people become Java programmers?
Before you become a Java programmer, it's important that you earn an education and learn how to code using Java. While some programmers learn how to use Java on their own, you can learn it much faster...
Rishav
0 0
5
Should we learn DBMS and RDBMS without any Java training?
java or i can say any programming language is not required to learn DBMS or RDBMS
Karthik
0 0
6
Which is better, PHP or Python? Why?
Python . Simple syntax,More readable,General purpose programming language
Kartheek
0 0
5

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

Ask a Question

Related Lessons

ClassNotFoundException vs NoClassDefFoundError
ClassNotFoundException NoClassDefFoundError It is an exception and happens due to programmer’s mistake and can be recovered by updating the code. Thrown when an application tries...

Tips of learning Java Language/Other Programming Languages
1.You should know the basic concept: If we talk about programming languages so basic concept are same in all the high level languages. So you should know the basic concept firstly then you can easily understand...
I

ICreative Solution

0 0
0

Class and Objects in Java
Class is a template or a blueprint which is used to describe an object. On other hand Object is a reference of a class which follows all the stuff written inside the class. How about taking the whole tour in the following video

Lambda Expressions in Java
A lambda expression, introduced in Java 8 is similar to a block of code resembling an anonymous function that can be passed to constructors or methods for execution as an argument. Examples: a)() ->...

SWITCH STATEMENT IN JAVA
switch statement - condition statement - only once the checking takes place so we recommend use break statement. switch(condition/variable/choice){case 1: //statements break;case 2: // statements break;case...

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