Question: Consider the fotowing classes defried in a Spring sppikaton package com.demo.company / public class Addres private String eity private String pincode public Address ( )
Consider the fotowing classes defried in a Spring sppikaton
package com.demo.company public class Addres
private String eity
private String pincode
public Address getter and setter methods
package Lage com.demo.company
public class Employee
private Address address: getter and setter methods
Config.xml
Main class:
ApplicationContext ace new ClassPathXmlApplicationContextconfigxml:
Employee el Employee acgetBean employee;
System.out.printlnCity: elgetAddressgetCity Street: "tel.getAddressgetPincode:
What is the output of the above code execution?
Throws NullPointerException
Display city as "Los Angles" and pincode as null
Display city and pincode as null
No bean named 'address' available
Display city as "Los Angles" and pincode as
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
