can we access the super class method using subclass object?
Answers were Sorted based on User's Feedback
Answer / azeem
Yes, you can acess the super class method by using the
subclass object because the super class methods are visible
to subclasses if not overriden. If the method is overriden,
then acess the super class method by using super.methodname
| Is This Answer Correct ? | 17 Yes | 0 No |
Answer / muthukumari
yes, we can access the base class methods using a derived
class objects.
| Is This Answer Correct ? | 9 Yes | 2 No |
If A is the super class and B is the subclass
inside subclass :
A a = new B();
a.methodA();
Here the methodA() should not be private.
| Is This Answer Correct ? | 1 Yes | 0 No |
They had given one progam final HashMap hm=new HashMap(); public void show() { hm.put("name",value); } in this prg here the final hashtable value can be changed in put method,its the prg run?
Which object oriented concept is achieved by using overloading and overriding?
What is toarray method in java?
How do you escape a string?
Give a brief description of java socket programming?
What are scalar data types?
What are other modifiers?
What is Map interface?
Package1 and Package2 both have a method name lets say "methodA" with different implementation. When I import both the packages in a java class how can I use both the methods?
where the static methods will live ,on stack ? can you explain brefly
How to sort the elements in HashMap
How many types of constructors are used in java?