Java design interview questions
These are set of Java Design pattern both core and J2EE questions which you could expect in an interview. Question are both beginner to advanced level.
- Do the need of DTO exists in the EJB 3 and up ?
The one of the main reason that give birth to the DTOs was entity beans were not selialized in earlier specification of EJB. Which made DTO a good candidate to carry data from and to between the different layers of the application. However EJB 3 's entity beans can be serializable making DTOs an unnecessary addition. However it still can be used when we need more of an assember than just a transfer object.
- What is the difference between Value Object and DTO ?
A Value Object was mostly confused to be a DTO, however they are differnt, A value Object is immutable, once created can not be modified, and one more important distiction is it two value objects are equal based on the value they bear, not if they are the same object ( reference). A value object represents a String like currency symbol, a name of a product etc. On the other hand a DTO is serializable, and mutable. To understand a value object better, lets take an example, if you were given 5 hunderd dollar bills, you would consider these notes as same, 5 hunderd dollar bill
- What is the disadvantage of DTO pattern ?
The DTO pattern is used to simplify the data access to the View layer, but problems that might arise it when a change is required in the domain model, we need to reflect it on the view layer, the domain model itself and our DTO. And since DTOs are tend to dumb objects ( no logic, only setters and getters ) it could be an overhead than a use, now that we have EJB3 with entity beans ( domain models ) serializable.DTOs can be considered highly overkill.
Questions on Singleton Pattern
- In how many ways can you create singleton pattern ?
There are few famous ways you can create singleton objects .
Lazy loading
eager loading
- Write a test class that your unsynchronised singleton implementation is giving you more than one different instances.
- If the singletons getInstance is not synchronized ( case of lazy loading ), does it guarentee it would give you maximum of two instances of singleton class in an multithreaded environment?
No, Threads can be unpredictable, we can't guarentee when the method is unsynchronized it would give max of two singleton instance.
wavecrest management
healthcare management
reputation management
wellington management
sheaff brock money management
customer relationship management
weight management
cerberus capital management
content management system
interventional pain management
conflict management
absence management
pain management doctors
classroom management
management definition
waster management
waste management schedule
cma management
strategic management
waste management holiday schedule
bh management
management concept
supply chain management salary
scion asset management
anger management film
health information management
fidelity cash management account
office of personnel management
cable management box
learning management system
elite model management
anger management (film)
rushmore loan management services
management of native encryption
heritage property management
account management
southern management
fleet management
supplier relationship management
resource management
performance management
playstation account management
revenue cycle management
project management resume
management consulting
waste manage management
https //id.sonyentertainmentnetwork.com/id/management/
investment management
integrated pest management
business management salary
st clair county emergency management
wells fargo asset management
google project management certificate
financial management
enterprise fleet management
property management bakersfield
liberty property management
money management
pain management doctor
waiste management
pain management physician
waste management open 2021
money management international
sentry management
property management companies near me
management abbreviation
intel(r) management engine components
human resource management
brookfield asset management
greystar property management
property management jobs
self management
property management software
rental management company
management of change
workforce management
conrex property management
product lifecycle management
emergency management
project management tools
abbreviation for management
waste management bagster
kellogg school of management
total quality management
matrix absence management
inventory management software
access management
management waste management
project management institute
focus workforce management
sims metal management
crown property management
enterprise risk management
hospitality management
quality management
facebook ad management
management waste
office personnel management
waste management holidays
human capital management
advanced pain management
team management
case management association of america
portfolio management
alliance property management
leland management
asset management company
investment management consultants association
emergency management jobs
project management certifications
waste management stock price
windermere property management
healthier choices management corp
fpi management
program management
aws management console
microsoft sql server management studio
waste management careers
management jobs
configuration management
what is project management
construction management degree
talent management
scientific management
rockefeller capital management
project management job description
data management
waste management pickup schedule
brand management
advantage property management
lighthouse property management
project management tool
management information system
premier property management
google ads management
american case management association
management information systems
human resource management system
business management degree
project management salary
knowledge management
archegos capital management
management skills
mynd property management
time management skills
waste management customer service
great jones property management
rbc wealth management login
what is risk management
case management salary
sports management jobs
privileged access management
suncoast property management
crisis management
stress management techniques
classroom management strategies
frontline absence management
device management
annaly capital management
merrill lynch wealth management
change management process
operations management
easte management
terror management theory
anger management classes near me
elliott management
system for award management
madison property management
waste management management
businesses management degree
impression management
utopia management
top management
id.sonyentertainmentnetwork.com id/management/
anger management cast
sql management studio
pain management doctor near me
ares management
pinnacle property management
Source: www.bullraider.com
Share this article
Related Posts