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

Android Realm Abstract Class Instantiate
If DateFormat is an abstract class how is it instantiated with getInstance() method
wxribbonbuttonbase dynamic label change
Initializing Variable in Subclass
Why cant we instantiate abstract class
Abstract classes error display
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

Categories

HOME
cakephp
pandas
arduino-uno
atom-editor
reserved
getelementsbytagname
spring-cloud-stream
google-project-tango
swagger-ui
communication
vifm
reveal.js
mapserver
google-cloud-ml
solaris-10
ab-testing
chromium-embedded
format-specifiers
qhull
status
phpfox
greendao
linkerd
javascriptcore
uiswipegesturerecognizer
android-nestedscrollview
mapbox-gl
fusionpbx
plsql-psp
git-merge
serve
x11-forwarding
lto
space-complexity
impersonation
jna
ansible-playbook
greenrobot-eventbus
awt
mapzen
janrain
eigenvalue
no-www
unixodbc
galleria
user-accounts
xml-documentation
parentheses
dds
jquery-nestable
gabor-filter
jspdf-autotable
titanium-android
dwscript
django-scheduler
mediaelement
topbeat
specrun
objective-c-swift-bridge
root-framework
elements
ctest
websitepanel
actionbardrawertoggle
skype4py
qgraphicsview
nessus
php-internals
unity-networking
google-places
responsive-images
operation
dd
coldbox
mdt
wordpress-theme-customize
article
message-driven-bean
centos5
gnu-smalltalk
web2py-modules
opcache
plasma
factory-method
hamiltonian-cycle
automount
bubble-chart
nsmanagedobject
mercurial-server
libc++
qt-jambi
genshi
netbeans-7.1
file-comparison
celltable
gdlib
getresponsestream
filtered-index
thread-local-storage
port-number
msdev
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