Cast

Cast in java means to convert a value from one type to a different type. > for example: assuming that x is a double. you can do x = (int)(x + 0.5); to round a double to integer. Cast is very useful in ArrayList, because ArrayList save all value as Object type, therefore, every time you try to get something from ArrayList, you have to cast it. > ex: x = new ArrayList; > x.add("example"); > system.out.print( (String)x.get(0) );