Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is object type casting? give some example with related?

Answer Posted / aaratim

Object type casting is converting a object type into another
type. For example

Iterator ite = emplist.iterator();
while(ite.hasNext()){

Employee empObj = (Employee)ite.next();

}

Here ite.next returns instance of type Object, we need to
convert it to type Employee so this is called type casting.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which list does not allow duplicates in java?

871


What happens when a thread cannot acquire a lock on an object in java programming?

947


Explain the difference between collection api and stream api in java8?

909


What is the role of the java.rmi.naming class?

995


What is the covariant return type?

1021


What are examples of modifiers?

1010


What are the disadvantages of using inner classes?

1054


Can an object be null?

908


Does substring start with 0?

931


What are the different collection views provided by maps?

930


Can anonymous class have constructor?

971


What are thread priorities and importance of thread priorities in java?

1057


What is a null point?

967


What is a 16 bit word?

943


What are the two ways of implementing multi-threading in java?

1415