Question: What effect does private static have on the object service below?
- The application will result in a compile error because you can't autowire a private variable.
- The application will compile and run, and service will have its dependency correctly injected by Spring.
- The application will compile and run, but service will not be autowired because you cannot autowire a static class member.
- The application will result in a compile error because you attempted to autowire a static variable.
Answer: The correct answer of the above question is Option C:The application will compile and run, but service will not be autowired because you cannot autowire a static class member.