hi guys,
I have a question, I have seen variable declaration like below and wondering why/how it's working. I was expecting an error and both new and static keywords are used together.
static Class1 obj = new Class1(); |
Any idea why it's working and not giving any error?
Thanks,
Prakash

Shubham KumarPosted Apr 14, 2015, 3:11 AM
your Class1 is public and you can make the Class1's object as static.