Why does the android Bitmap class not use the new keyword?
As the title says, why does it not use the new keyword? Why do we have to create any new bitmaps in a static way?
This is a design choice. The designers deemed it non-sensible to allow new Bitmap instances to be created without using one of the many (static) factory methods.
One advantage is that it allows the factory methods to - if such is appropriate - return the same instance across multiple calls. Note that some Bitmaps returned are guaranteed to be immutable, and thus safely re-usable (which can avoid wasting memory with duplicated image data).
Use one of the Bitmap.createBitmap factory method overloads to obtain a (possibly but not guaranteed to be new) Bitmap object.
Using new Bitmap() is not allowed because the Bitmap constructor is is private, such that only the factory methods can access it directly.