Spring IOC Set4

What are the metadata Bean Definition objects contain ?

What is Bean Factory?

 

Which statements are true about DI(Dependency Injection) ?

DI says your components and services should  tightly coupled in code .

Which of the following  are basic techniques to implement inversion of control?

Which of the following statements  are false ?

Constructor-based DI is effected by invoking Setter Injection each representing a dependency

Constructor-based DI is accomplished when the container invokes a class constructor with a number of arguments 

@Autowire annotation annotation on constructor for constructor based autowiring.

What are the correct ways to define constructor injection ?

public class Wheel{

public Wheel(){

System.out.println("wheel");

{

}

 

public class Car {

private Wheel wheelObj=null;

 

  public void setWeelObj(Wheel wheel){

  this.wheelObj=wheel;

  }

  public Wheel getWeelObj(){

 return wheelObj;

  }

}

What are the  correct ways to write setter injection?

 

 

 

 

 

 

 

 

public class Wheel{

public Wheel(){

System.out.println("wheel");

{

}

public class Car {

private Wheel wheelObj=null;

public Car(Wheel wheelObj){

this.wheelObj=wheelObj;

}

 public void setWheelObj(Wheel wheel){

  this.wheelObj=wheel;

  }

  public Wheel getWheelObj(){

  return wheelObj;

  }

}

In the above  example, what are correct ways  to write inner bean?