java define float code example Example: what is a float java Click to copyfloat int = 3.1415 //pi is a float because it is a decimal