Java examples for Language Basics:float
Compare Two float Arrays
import java.util.Arrays; public class Main { public static void main(String[] args) { float[] floatArray1 = new float[]{9.4f,3.4f,5.1f}; float[] floatArray2 = new float[]{9.4f,3.4f,5.1f}; //w w w . j a v a 2 s. c o m boolean blnResult = Arrays.equals(floatArray1,floatArray2); System.out.println("Are two float arrays equal ? : " + blnResult); } }