answersLogoWhite

0

yes

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Can you override an instance method and make it final?

No. Once a method is declared final in a class, no derivative of that class can override that method.


WHAT IS A specific instance of a class is called?

Specific instance of a class is called object of that class.


A final class can have instances?

Yes. You cannot inherit a final class but very well instantiate a final class


Why pointer is not an object?

A pointer in itself is not an object, because it is not an instance of a class. Of course you can define a class which has only one member, which is a pointer. class Pointer { public void *ptr; }; Pointer p, q, r;


What do you mean by Get instance?

It means create an object for a class. Instance refers to the obj of a class.


What is mean by instance variable with example?

hi friend.... Instance variable means with which you need to create an obeject in order to invoke any methods or variables defined in a class. For ex: class A { int a=10; public void inc() {return a++; } } To invoke a member A b=new A(); b.inc(); System.out.println(b.a); If incase of a static method you can directly call using class name itself. like : b=Math.sqrt(a);


What is the purpose of the this operator?

The 'this' pointer is not an operator, it is a special pointer that exists within every instance of a class, and always points to the current instance of that class. It can only be used in non-static methods of the class because static methods do not have a 'this' pointer; static methods can be called even when there is no instance of the class. Whenever an instance method refers to one of its own members (non-static members), the 'this' pointer is implied: int CMyObject::foo() { return( this->bar ); // returns the bar member of this instance. } The 'this' pointer also makes it possible for an instance to compare itself to other instance references (often to ensure they are different instances) as well as to return a reference to itself. The assignment operator cannot be implemented any other way: CMyObject& CMyObject::operator= (const CMyObject & rhs ) { if( this != &rhs ) // check for self-reference bar = rhs.bar; // perform assignment return( *this ); // return a reference to this instance. } The 'this' pointer also allows an instance to pass a reference or pointer to itself to external functions, including the methods of other instances of the same class.


What do you mean by instance of the class?

I have no idea. Was going to ask you the same question...An instance method represent the behavior of an object


What are instance variables?

These are normal variables declared within a class that are attached to an object instance of a class.


Difference between instance and object?

Object - When there is an value. int[] arr={1,2,3}; Instance - when there is a declaration for class with 'new'. String arr=new String("test"); A obj2 = new A(); //this is the object instance with occupy memory for this.. For user defined classes, object and instances are same.


What is the difference between classes and object in C?

An object is an INSTANCE of a class. Human is a class, while YOU are a person, an instance of Human class, but YOU do not represent the entire human class. Or, a class provides the abstraction, and an object is a typical example of that abstraction. Classes provide a blue print to build a real instance of an object.


What is current instance in java?

Instance refers to one item of a particular type. for ex: you are one instance of a human, similarly I am one instance of human. An instance in object oriented terms refers to one item of a particular object type.