+ 1
can the term (int) be a method as well?
4 Respuestas
+ 1
int is a primitive type of integer numbers.
if you need to extend its methods try to use Integer class instead..
Oracle doc here: https://docs.oracle.com/javase/7/docs/api/java/lang/Integer.html
+ 1
Nope. int is a reserved keyword, so it can't be an identifier. It can, however, cast a variable as an integer.
0
what do you mean by method ?!!
0
Dont get confused with the term "method".
Method is just implementation of a particular action.
You can name a method, anyname besides the reserved keywords in java.