English, asked by uma102rymec, 1 month ago

Question # 2
Revisit
There are two classes 'Person' and 'Doctor such that Doctor extends Person.
Consider Spring Config.java:
What is the correct way to use this bean?
1 @Configuration
2 public class SpringConfig {
A
@ Bean
public Person doctor(){
Person nurse = new Doctor ("Nia", "Nurse' );
return nurse;
}​

Answers

Answered by tamoreaastee
0

Answer:

I don't know what to do about it

Similar questions