Browse Definitions :
Definition

instance

What is an instance?

In object-oriented programming (OOP), an instance is a specific realization of any object. An object may be different in several ways, and each realized variation of that object is an instance. The creation of a realized instance is called instantiation. In computing, an instance can take the form of a document type or an element.

what is object-oriented programming
This image shows an example of the structure and naming in object-oriented programming (OOP).

Whenever you run a program, it's an instance of that program. In languages that create objects from classes, an object is an instantiation of a class. That is, an object is a member of a given class with specified values rather than variables. For example, in a non-programming context, "bird" could be a class and your pet bird Polly an object of that class.

Class instance and instance variable

An instance of a class is an object. It is also known as a class object or class instance. As such, instantiation may be referred to as construction.

Whenever values vary from one object to another, they are called instance variables. These variables are specific to a particular instance. A copy of an instance variable is created for every object and won't be shared by other objects. 

Java instances and instance variables

Java is a specific class, and a physical manifestation of this class can be called an instance. Instances of a class have the same set of attributes. However, each instance may be different because of what's inside each attribute.

Variables declared inside a class but outside the scope of any blocks, constructors, or methods are known as instance variables in Java. To create instance variables, an object must be instantiated and accessible to all blocks, constructors and methods in that class. Each object contains its own copy of instance variables.

Python instances and instance variables

In the Python programming language, an instance of a class is also called an object. The call will comprise both data members and methods and will be accessed by an object of that class.

In Python, instance variables or instant attributes are bound to a particular instance of a class, and class variables are bound to a class.

AWS instances and instance stores

An instance in Amazon Web Services (AWS) is a virtual server in the AWS Cloud. In Amazon Elastic Compute Cloud (Amazon EC2), the operating system (OS) and applications that run on the instance can be set up and configured. You can also use an extensive collection of AWS instance types optimized to fit different use cases

In Amazon EC2, an instance store offers temporary block-level storage for any instance. However, this instance storage will be on disks physically attached to a host computer.

Database instances and segmentation

An instance in a database is a combination of the program and memory used to access metadata and application data stored in physical files on a server. For example, whenever you log into a database, each login session is an instance. As such, an instance in a database manages all associated data and serves the database users.

Detecting instances of objects and demarcating their boundaries is called instance segmentation. In deep learning (DL), the computer vision task for detecting and localizing an object in an image is called instance segmentation.

See also: Functional vs. object-oriented programming: The basics

This was last updated in May 2022

Continue Reading About instance

Networking
  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

  • private 5G

    Private 5G is a wireless network technology that delivers 5G cellular connectivity for private network use cases.

  • NFVi (network functions virtualization infrastructure)

    NFVi (network functions virtualization infrastructure) encompasses all of the networking hardware and software needed to support ...

Security
  • virus (computer virus)

    A computer virus is a type of malware that attaches itself to a program or file. A virus can replicate and spread across an ...

  • Certified Information Security Manager (CISM)

    Certified Information Security Manager (CISM) is an advanced certification that indicates that an individual possesses the ...

  • cryptography

    Cryptography is a method of protecting information and communications using codes, so that only those for whom the information is...

CIO
  • B2B (business to business)

    B2B (business-to-business) is a type of commerce involving the exchange of products, services or information between businesses, ...

  • return on investment (ROI)

    Return on investment (ROI) is a crucial financial metric investors and businesses use to evaluate an investment's efficiency or ...

  • big data as a service (BDaaS)

    Big data as a service (BDaS) is the delivery of data platforms and tools by a cloud provider to help organizations process, ...

HRSoftware
  • talent acquisition

    Talent acquisition is the strategic process an organization uses to identify, recruit and hire the people it needs to achieve its...

  • human capital management (HCM)

    Human capital management (HCM) is a comprehensive set of practices and tools used for recruiting, managing and developing ...

  • Betterworks

    Betterworks is performance management software that helps workforces and organizations to improve manager effectiveness and ...

Customer Experience
  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...

Close