Although a static method can't access instance variables, it can access static variables. A common use of static variables is to define "constants". Examples from the Java library are Math.PI or Color.RED. They are qualified with the class name, so you know they are static. Any method, static or not, can access static variables. Instance variables can be accessed only by instance methods.
"Java talks" is about Java technologies including: Hibernate, JDO, JDBC, Servlet, JSP, Sturts, Web Services, Spring, AWS, Spring Boot, Spark, Scala etc.
Comments