Computer Science, asked by chordiasahil24, 1 year ago

Difference between static and non-static data members

Answers

Answered by singhshreyashi4
5
static members are accessed by their class name which encapsulates them, but non-static members are accessed by object reference. ... static constructor is used to initialize static fields, but for non-static fields normal instance constructor is used.

chriskevin: awesome answer
Answered by chriskevin
1
a static method belongs to class and a non static method belongs to an object of class

singhshreyashi4: ya
singhshreyashi4: k wait
singhshreyashi4: hmm
Similar questions