I have been reading for and practicing dependency injection for the past two days but nothing is working out, and suddenly I found out that there were some frameworks required in order for dependency injection to work. Is that true? Isnt it a bad practice to make my project depend on some framework? Could it be done without the use of a framework?
EDIT: Im new to programming so I dont understand what is the difference between instatiating a class and using its methods (i dont need a framework for that) and using dependency injection and what is better about it
EDIT: Here is an example of me not using a framework and things not working TestNG @Factory annotation + not enough knowledge on Dependency Injection