what is class and object explain with example?

Answers were Sorted based on User's Feedback



what is class and object explain with example?..

Answer / karthik

Classes and objects are separate but related concepts.
Every object belongs to a class and every class contains
one or more related objects. A Class is static. The
attributes of a class don't change. An Object on the other
hand has a limited lifespan. Objects are created and
eventually destroyed. Also during that lifetime, the
attributes of the object may undergo significant change. A
class is a general concept while objects are the specific
and real instances that embody that concept

Is This Answer Correct ?    46 Yes 10 No

what is class and object explain with example?..

Answer / dsr

class is templet of an object. object is a instatiate the
class.Object is super class of all objects.

Class One{ //class

public void getMethod(){

Console.WriteLine("one....");

}

public static void main(String[] args)
{
One one = new One(); //one is an object of that class.
console.writeLine();
}

Is This Answer Correct ?    15 Yes 3 No

what is class and object explain with example?..

Answer / prachi bidwale

CLASS IS A COLLECTION OF VARIABLES AND FUNCTIONS.

Is This Answer Correct ?    9 Yes 3 No

what is class and object explain with example?..

Answer / mayur

its true class is a variables and functions.

Is This Answer Correct ?    4 Yes 0 No

what is class and object explain with example?..

Answer / shubham saurabh

Object has states and behaviours. An object is instance of object.Exp:states-colour,name,breed and behaviour-wagging,barking,eating.
A Class is a template/blue print that describes the behaviour of object.

public class Dog
{
string breed;
int age;
string colour;
void barking()
{
}
void hungry(){
}
void sleeping(){
}
}

Is This Answer Correct ?    3 Yes 0 No

what is class and object explain with example?..

Answer / kvr

class had not any methods and variables class pointed to
where we get methods and variable
object have methods and variables

Is This Answer Correct ?    9 Yes 7 No

what is class and object explain with example?..

Answer / manas kumar maharana

object is a realworld entity which have some proporty and
behabiour.it is a runtime entity in oops.it is a
partitioned area of memory containg data and function to
process the data.
class is a collection of simillar type of objects.it is a
user define datatype
example:
class muna
{
memberfunction()
{
datatype:
}
};
main()
{
muna ob1;
ob1.memberfunction();
}

Is This Answer Correct ?    6 Yes 4 No

what is class and object explain with example?..

Answer / achal pagar

Class is base of OOPS and the user define data type;class is hert of any program.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Dot Net AllOther Interview Questions

Difference between abstract class and interface

100 Answers   Accenture, Altruist, Baba Group, CitiGroup, Fiserv, HCL, IBM, iGate, Infosys, Jean Martin, Karthik Industries, Microsoft, OnDLine, TCS,


What is parallel computing?

0 Answers  


What is the difference between a web custom control,web user control and a web part.

1 Answers   247Customer,


How to send e-mail to gmail/yahoo or any other ID from your mail server.I need the code.

1 Answers  


What is the use of web.config?

0 Answers  


if i want to validate all the control on web page how i will do

2 Answers   PCS,


What does the "EnableViewState" property do? Why would I want it on or off?

2 Answers  


What is cache coherency? : Dot net architecture

0 Answers  


Explain the difference between state server and sqlserver : Dot net architecture

0 Answers  


How many types of assemblies are there in the visual studio.net?

1 Answers   Six Sigma,


Are there any third party logging components available?

0 Answers  


1. How to restrict a class from allowing to create only one object. I.e., one should be allowed to create only one object of the class type.

1 Answers   247Customer, FinEngine, TCS,


Categories