If a member needs to have unique value for all the objects of that same class, declare the member as

Options
- Global variable outside class
- Local variable inside constructor
- Static variable inside class
- Dynamic variable inside class


CORRECT ANSWER : Local variable inside constructor

Discussion Board
Static

It should be static because of unique number.

umesh 12-28-2016 12:23 AM

Correction

It should be strictly STATIC.

Tejas Patil 07-2-2016 11:20 AM

Should be Static.

It should be static. As per the answer her,If it's local, it'll never become part of object.

Subrat 12-31-2014 02:51 AM

If a member needs to have unique value for all the objects of that same class, declare the member as

It should be Static!

Local variables lose their values when exit the block...

John Simon 01-21-2014 02:15 PM

Correct?

should it not be Static variable?

jan jansson 10-8-2013 10:46 AM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement