refering to Head Frst JSP Servlets ,,page 416.
What happens when these parts of servlet code Exceute? (person is abstract and eMployee is concrete).
1
Person p = new Employee();
p.setName("evan");
request.setAttribute("person", p);
2
Employee p = new Employee();
p.setName("evan");
request.setAttribute("person", p);
Should the results of both not be the same?
What happens when these parts of servlet code Exceute? (person is abstract and eMployee is concrete).
1
Person p = new Employee();
p.setName("evan");
request.setAttribute("person", p);
2
Employee p = new Employee();
p.setName("evan");
request.setAttribute("person", p);
Should the results of both not be the same?