abstract-class


If DateFormat is an abstract class how is it instantiated with getInstance() method


As per my understanding the interface and abstract class can not be instantiated. Then how could the DateFormat abstract class be instantiated with static factoy method getInstance() ?
That's the whole point of a factory method.
It returns an instance of DateFormat or of a subclass of DateFormat. You don't know which. You don't care which. You just care that all the methods of DateFormat are going to work.

Related Links

Abstract Classes - A glitch in my program
How to implement IXmlSerializable correctly for a ICollection<T> where T is an abstract class?
Typescript multiple inheritance workarounds?
Class diagram usage in UML
AutoMapper and Base Types
Abstract Class Initialization
Covariant return types
Empty abstract function cannot contain body
Using Visitor Pattern to detect intersection between two shapes
mongodb lift class Snippet needs to be abstract
Abstract class as return of wcf ria method
OpenKinect - FreenectDevice abstract?
Intercepting method from abstract parent on derived instance using DynamicProxy
In an UML diagram, when should a class be abstract?
Abstract Class is a good practice?
Java - Using Abstract classes properly (problem with COLT)

Categories

HOME
ms-access
image
clips
gremlin
session
serverspec
opengl-es-2.0
in-app-purchase
directx
cross-validation
add
medical
volttron
floating-action-button
windows-azure-storage
circular-dependency
remote-access
fallback
decimal
jsdoc
flux
clickonce
abi
orleans
functional-testing
emgucv
pepper
facet
selectedindexchanged
minitab
opentype
jspm
kendo-datasource
nouislider
stormpath
bcd
ecto
functor
oracle-fusion-middleware
google-qpx-express-api
mozilla
mapbox-gl
environment-modules
stacked
jquery-bootgrid
vapor
az-application-insights
ssjs
webdriver-manager
broadcastreceiver
particles.js
spring-security-kerberos
outlook-api
reactive-cocoa-5
convertapi
wso2carbon
zip4j
dropbox-php
veracode
nstextview
kbuild
sqlclient
akka-cluster
azure-sdk
packagist
pickadate
ios4
freelancer.com-api
uid
unity-networking
django-unittest
wordml
computer-algebra-systems
tableau-online
twirl
sortedlist
web-controls
jsapi
npapi
csquery
jscript.net
xcode-6.2
phpthumb
expected-exception
multiprocessor
quantlib-swig
gridfs
batterylevel
mylyn
robotics-studio
mt
appconkit
code-cleanup
doh
genshi
xdomainrequest
site.master
createwindow
gamma
compiler-specific
memory-size
virtual-functions
sector
grid-system
ugc
commodore

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App