OOP


OOP

Object-Oriented Programming Concepts

What Is an Object?

An object is an instance of a class. An object in OOPS is nothing but a self-contained component which consists of methods and properties taken from the original class. When you send a message to an object, you are asking the object to execute one of its methods as defined in the class.

What Is a Class?

Classes are a blueprints or a set of instructions to build a specific type of object. It is a basic concept of Object-Oriented Programming. Class in Java determines how an object will behave and what the object will contain.

public class Main {
int x = 5;
}

an example of a Java class.

The class is made from some component’s that are:

  1. Modifiers: A class can be public or has default access.
  2. class keyword: class keyword is used to create a class.
  3. Class name: The name should begin with an initial letter.
  4. Body: The class body surrounded by braces, { }.

Binary, Decimal and Hexadecimal Numbers

Binary Numbers

A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method of mathematical expression which uses only two symbols: typically “0” and “1”.

Decimals

The decimal numeral system is the standard system for denoting integer and non-integer numbers.

Hexadecimal Numbers

Hexadecimal is the name of the numbering system that is base 16. This system, therefore, has numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15. That means that two-digit decimal numbers 10, 11, 12, 13, 14, and 15 must be represented by a single numeral to exist in this numbering system.

numbers


   

Get back to EMAM’S HOMEPAGE

I have created this page as a part of my project using Github, Please visit my profile, I will be more than happy to hear from you all.                       © Emam Shararah 2021