- Details
- Written by Nam Ha Minh
- Last Updated on 19 August 2019   |   Print Email
In Java, the int keyword is used to declared a variable as a numeric type. An int value can hold a 32-bit integer number which ranges from -231 to 231 - 1. For example:
int childCount;
The int keyword can be used to declared return type of a method as well:
public int getChildCount() {
return 10;
}
See all keywords in Java.
Related Topics:
Other Recommended Tutorials:
About the Author:
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on
Facebook and watch
his Java videos you YouTube.