what can be static?
varibles (but they are NOT state)
methods
What does it mean to be static?
static means "shared"
property of the class as a whole
static land | instance lang
g|-
r|-
e|-
static items have s|-
no access to instance e|- instance items have access to
date or methods |- static items.
|-
static methods |-
static variables |- non-static methods
--------------------------------------------------
ArrayList<String< al = new ArrayList<>
ArrayList<Fooments< bl = new ArrayList<>
What about type parameters?
Type parameters are instance data!
How can we have static generic methods?
public class GenericClass<T>
{
public GenericClass(args....)
{
}
public static <T> returnType nameOfMethod(args....)
{
}
}