restriction tag

1 questions


1 answers
146 views
0
What is the role of the keyword static in the class?

package hello;public class Hello { Clock clock = new Clock(); public static void main(String args[]) { clock.sayTime(); }}When there was a code like this Cannot access non-static field in static meth...


© 2024 OneMinuteCode. All rights reserved.