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
What is a pattern what is an anti pattern?
What is hash code collision?
What is a ?
What is enhanced loop in java?
What is the applet security manager, and what does it provide?
what is meant by Garbage collection?
whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net
What is ellipsis in java?
Which class should you use to obtain design information about an object in java programming?
Why does java does not support multiple inheritance? Explain
Can inner class be public in java?
What is generic class?
What happens when I use / and % with a negative numerator?
What are variable arguments or varargs?
What is Java Package and which package is imported by default?