Skip to content

Commit 4a321ce

Browse files
authored
Update README.md
1 parent 73211d0 commit 4a321ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ It is also a good practice to annotate overridden methods with `@Override` to ma
371371
* What the difference between local, instance and class variables?
372372
- Local variables exist only in methods that created them, they are stored separately in their respected Thread Stack (for more information, see question about Java Memory Model) and cannot have their reference passed outside of the method scope. That also means that they cannot be assigned any access modifier or made `static` - because they only exist during enclosing method's execution and those modifiers just do not make sense, since no other outside method can get them anyway.
373373
- Instance variables are the ones, that are declared in classes and their value can be different from one instance of the class to another, but they always require that class' instance to exist.
374-
- Class variables are those, that are marked with `static` keyword in their class' declaration. They can only have one value across all instances of that class and can even be retrieved without that class' instance (if their access modifier allows it).
374+
- Class variables are those, that are marked with `static` keyword in their class' body. They can only have one value across all instances of that class (changing it in one place will change it in their class and, therefore, in all instances) and can even be retrieved without that class' instance (if their access modifier allows it).
375375
* What is reflection? [Jenkov](http://tutorials.jenkov.com/java-reflection/index.html)
376376
* What are strong, soft, weak and phantom references in Java?
377377
* What is Dependency Injection? Can you name few libraries? Have you used any?

0 commit comments

Comments
 (0)