3
Reply

Can we use “this” within a static method?

Pradeep Yadav

Pradeep Yadav

7 years ago
535
0
Reply

    Technically its not possible , because static portion execute before any other part of code o this keyword will be without referenced

    Manav Pandya
    6 years ago
    0

    No, this keyword denotes instance variables and functions. In static method, Only static properties initialize.

    Kapil Gupta
    6 years ago
    0

    No, We can not use, we can only use static variables/methods in a static method.

    Pradeep Yadav
    7 years ago
    0