class in object oriented programming code example
Example 1: object oriented programming languages
Object oriented programming languages include:
Java
JavaScript
Python
C++
Visual Basic .NET
Ruby
Scala
PHP
These are just the main ones, there's much more out there.
Example 2: principles of object oriented programming
public class Main {
public static void main(String[] args) {
Cat thor = new Cat();
Cat rambo = new Cat();
thor.name = "Thor";
thor.age = 3;
thor.breed = "Russian Blue";
thor.color = "Brown";
thor.sleep();
rambo.name = "Rambo";
rambo.age = 4;
rambo.breed = "Maine Coon";
rambo.color = "Brown";
rambo.play();
}
}
Example 3: class and object in oop
GREDSTEDTRDTDY