adspace


What is oops concept with example?

Answer Posted / Arvind Kumar Gupta

Object-Oriented Programming (OOP) is a programming paradigm based on the concept of objects. An object contains data and methods that operate on the data. Here's an example in Java:
class Rectangle {n private int width, height;
// constructor
public Rectangle(int w, int h) {n width = w;nh height = h;n }n // method to calculate area
public double getArea() {n return width * height;n }n}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please send ford technologies placement paper 2 my mail id

2177


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

2278