Forums Register Login

static

+Pie Number of slices to send: Send
can we use this reference inside a static method or a class?
can we use static and native together?
can anyone explain this?
+Pie Number of slices to send: Send
We cannot use 'this' refernce inside the static methods.
Reason for it is that 'this' belongs to an instance whereas static stuff does not belong to any particular instance, but to the class in general.
+Pie Number of slices to send: Send
this is non static and cannot be refered from static context.
A method can be both native and staic.
brevity is the soul of wit - shakepeare. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 540 times.
Similar Threads
how counter variable works in jsp
Why calling super to reach a static member is ALWAYS illegal?
static block
Static
Cookies
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:36:13.