package statictest; public class StaticTest { public static void main(String args[]) { System.out.println(Test.i); } } | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

package statictest; public class StaticTest { public static void main(String args[]) { System.out.println(Test.i); } }

Solve the query

18th Sep 2021, 1:34 AM
Prathamesh Dalvi
Prathamesh Dalvi - avatar
2 Answers
0
Did you check whether your code was valid before posting it here? Here's tips for you on posting a question 👍 https://www.sololearn.com/Discuss/333866/?ref=app
18th Sep 2021, 4:17 AM
Ipang
0
.declare static field i inside class with value .instead of Test use StaticTest
20th Sep 2021, 8:41 AM
zemiak