Question
Which of the following statements accurately describes
the object-oriented programming (OOP) support in Java and C?Solution
Java is designed as an object-oriented programming language and provides built-in support for OOP concepts such as classes, objects, inheritance, polymorphism, encapsulation, and abstraction. In Java: • Classes and Objects: The fundamental building blocks of Java programs. Classes define the blueprint for objects, and objects are instances of these classes. • Inheritance: Allows one class to inherit fields and methods from another class. • Polymorphism and Encapsulation: Java supports method overloading, method overriding, and access control mechanisms to protect data and behavior. C, on the other hand, is primarily a procedural programming language and does not have built-in support for OOP concepts. While you can use structures and function pointers to emulate some OOP concepts, C does not natively support: • Classes: C does not have the class construct; instead, it uses structures to group related data. • Inheritance and Polymorphism: These features are not natively supported in C. They can be approximated using techniques such as function pointers and structs, but this is not as straightforward or robust as in OOP languages like Java.
Which is the most peaceful country in the world according to the Global Peace Index 2023?
Which bank received a $500million loan from the International Finance Corporation (IFC) for microloans to underserved women?
In 2019, which Indian classical dance did Manju Barggavee contribute to, earning her the Sangeet Natak Akademi Award?
How many ministers are part of the new government under Germany’s Chancellor Friedrich Merz?
Who won Iran's presidential election with 53.7% of the votes?
Which organization released a report stating that NBFC-MFIs are the largest providers of micro-credit in India?
The Pushkar Fair, also known as the Camel Fair, is held in which Indian state?
Who recently made history in the Indian Army by becoming the first woman to attain the prestigious rank of Subedar, marking a notable stride forward for...
Imphal is the capital of which state?
Which city in Uttar Pradesh is known for its historical fort, Jhansi Fort?