Answer Posted / sayyad khalid
Object is an instance of a class.
from where we can access the member of class & modified it.
object is an real time entity which we can described by the help of class.
we can create no.of objects of same class.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)
Which browsers work with java?
What are the files generated after using IDL to java compiler?
What is the purpose of extern variable?
What are the approaches that you will follow for making a program very efficient?
What does a method signature consist of?
When parseint method can be used?
What is files manifesting?
What is the use of singleton class?
Give me example of derived data types.
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread
What is difference between stringbuffer and string?
Explain about the interpreter in java?
Why does java not support operator overloading?
How do you compare objects in java?