Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started