answersLogoWhite

0

What is object in programming?

Updated: 8/10/2023
User Avatar

Wiki User

11y ago

Best Answer

Object in context of a class is the root of the class hierarchy in Java in the java.lang package.

Every class has Object as a superclass whether it's explicit or not. All objects, including arrays, implement the methods of this class.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

A class is a construct that is used to create instances of itself.

An object is one instances of a class.

String s = new String("Hello World!")

The class String is used to represent multiple characters togheter.

String is the name of the class and s is the name of an object of String.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

friend, I'll explain an object in the context of class in CPP programming.

after the definition of a class , you can define an object belonging to that class.

for example,

class student

{ int rollno;

char name[10];

void getdetails()

{cout<<"enter the roll number and name of the student";

cin>>rollno;

gets(name);

}

void showdata()

{cout<<"the name is"<<name<<"and the rollnumber is"

<<rollno;

}} sara;

here sara is an object belonging to class student.

object sara can use the function getdetails() to get values to the identifiers rollno and name.

" Class is a group of objects with similar characters ( eg: rollno , name) and behaviour ( ie., the member functions-getdetails and showdata)"

" An object is a an entity with certain characters and behaviour"

here object sara denotes a student sara. now, you can create another object rahul to the class student by typing the code- student rahul;

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Have you heard the term

object oriented programming

an object is nothing but me,you,dog......... Like that it goes on

every body has his own status and behaviour like

my status like

I'm black in colour

I'm 5'9 inches height

my behaviour like

i can walk

i can swim

i can run

so in the real world all our surrounding can be treated as objects

and know coming to the

object oriented programming

all the situations offered for creating a program can be divided into status and behaviour.......

By your's Amogh reddy

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Objects have many benefits, including abstraction, encapsulation, and polymorphism. These traits are desirable because it reduces the amount of code developers must write to create usable applications that are robust, relatively error free (as opposed to C, for example), and secure.

This answer is:
User Avatar

User Avatar

Wiki User

15y ago

The textbook definition of an object is an instance of a class.

// In this example, str is an object of the String class

String str = "happy";

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

class is a collection of data and member functions,and collection of variables and methods..

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

The Object class has many methods including, toString, clone, equals, etc.,

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is object in programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is full form of oop's?

Object Oriented Programming


What is object based programming language?

Object-based programming language is a language that supports all the features of object oriented programming features like classes,object,encapsulation ,abstraction,polymorphism etc except inheritence.


Is PHP object oriented?

Yes - 'advanced' PHP programming uses Object Oriented Programming (OOP).


What is an essential of Object Oriented Programming?

The 3 essential concepts of Object Oriented Programming are:InheritanceEncapsulation &Polymorphism


Full form of oops?

The full form of OOP is Object-Oriented Programming.


What actually mean by object oriented programming Is C plus plus is a object oriented programming?

Just eat a watermellon!


What is copy constructor in object oriented programming?

The purpose of constructor in object oriented programming is to initialize data. Likewise copy constructors are used to initialize an object with data from another object.


Difference between conventional programming and object oriented programming?

diff between oops and conventional programming


What are the limitation of structured programming?

By itself, structured programming does not support the notion of a function call. This is achieved through an extension of structured programming known as procedural programming. Object-oriented programming extends procedural programming such that data and the functions that operate upon the data can be encapsulated within an object.


Why did computer scientists introduce object - oriented programming?

If you work a while with object-oriented programming, you'll notice that it offers huge benefits over the traditional approach. In fact, you would rather not use a programming language that doesn't have at least the option of object-oriented programming, if you have the choice.


What is the distinct difference between object oriented concept and object oriented programming?

Object oriented concepts are a generalisation of the object oriented principals (encapsulation, inheritance, polymorphism and abstraction) without specifying a particular implementation of those principals. Object oriented programming is the application of those principals through an object oriented programming language.


What are the two major types of programming languages in c plus plus?

Object oriented programming and structured programming.