Everything in python is a first-class, since everything is object and object is first-class. In other words, a class, a function, a method ... are assignable, referable, and so on, they use the standard data structure of the language.
In java this is not true.
Here is a demonstration:
Python:
class A:
pass
def test():
pass
print(isinstance(test,object))
a = 1
print(isinstance(a,object))
a = A()
print(isinstance(a,object))
print(isinstance(A,object))
Java:
public class Test {
public static void main(String... args){
int a = 1;
System.out.println( a instanceof Object);
}
}
Ref: link
But in Java it is possible to say that objects and primitive types are first-class.
Ref: link