Answer Posted / regalla soujanya naresh reddy
A super class reference can be converted into a subclass
reference but this
subclass reference is not useful to call the methods of any
of the classes. This convention is known as Downcasting.
We can convert the subclass reference to a superclass
reference without using the cast operation compiler because
it will internally take care of the casting. This is known
as Upcasting.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
How can you traverse a linked list in java?
I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?
Can we change the value of static variable?
How do you clear a method in java?
What are 4 pillers of object orinted programming?
What causes memory leak in java?
What are classloaders?
Can static methods access instance variables in java?
Is arraylist an object in java?
Is string serializable in java?
What is a parameter in a function?
What does the string method compareto () do?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
Can we overload the constructors?