Understanding Type Casting in Java : Free Java Tutorials

Through typecasting, we are not creating any new object in Java. But we are just providing another type of reference variable to the existing object. That is, we are performing typecasting and not object casting. String str = new String(“Meet”); Object obj = (Object)str; This is essentially same as defining String object with an Object …

Understanding Type Casting in Java : Free Java Tutorials Read More »