how to assign the static variable value to non static variable and use it in non static method . i tried it but the i cannot access the static variable to non static
static int a=100;
int b= a;
in above how can i access it its not working
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend3days leftRegister
Amit GuptaRank #190 · 12.8K pointsPosted Jan 12, 2019, 12:02 AM EST