+ 1

can the term (int) be a method as well?

26th Dec 2016, 4:57 PM
t_josh
t_josh - avatar
4 odpowiedzi
+ 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
26th Dec 2016, 5:22 PM
Michael Isac Girardi
Michael Isac Girardi - avatar
+ 1
Nope. int is a reserved keyword, so it can't be an identifier. It can, however, cast a variable as an integer.
27th Dec 2016, 2:08 AM
DaemonThread
DaemonThread - avatar
0
what do you mean by method ?!!
26th Dec 2016, 5:29 PM
Bilel Torche
Bilel Torche - avatar
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.
6th Jan 2017, 3:09 AM
Rishav Chudal
Rishav Chudal - avatar