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

What do you mean by Hash Map and Hash Table?

1096


What does this mean java?

1104


What are the advantages of defining packages in java?

986


What is a hashmap used for?

1247


Explain Basics of OOP Language in java

1060


what is instanceof operator used in java?

1037


Give reasons supporting that string is immutable.

942


What is the finalize method do?

1102


How do you define a parameter?

1035


What are class members by default?

1081


What is object cloning in Java?

1108


What are register variables what are the advantages?

903


How to sort double array in java?

985


How to sort array in descending order in java?

923


How do you know if a value is nan?

1059