---
title: "OOPS????"  
description: "In my last post, i explained about role of object in oops language. Now, we more elaborate it with some e.g.I explain it through a e.g. of car.In car,"  
author: "ANkita gupta"  
published: 2015-04-27  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/1750/oops  
category: "java"  
tags: ["oops"]  
reading_time: 1 minute  

---

# OOPS????

In my last post, i explained about role of object in oops language. Now, we more elaborate it with some e.g.I explain it through a e.g. of car.**In car, we have field: its mph and rpm. we have methods: gear, speed,cadence, music system volume.**

```
class Bicyclegear, speed, cadence , music system volume. {int cadence= 0;int speed=0;int music system volume=0;int gear=1;void changeCadence(int newValue){Cadence=newValue;}void speedUp(int increment){speed=speed+increment;}void changeGear(int newValue){gear=newValue;}void musicvolumeHigh{ int increment){music volume= music volume+ increment;}void printStates(){system.out.println("cadence:"+cadence+"speed:"'+speed+"gear:"+gear+"music volume:"+music volume);}
```

\

---

Original Source: https://www.mindstick.com/articles/1750/oops

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
