my method "abc" return array of interface "xyz"
and "pqr" is abstract class implements abc
and class "jkl" extends pqr

My problem
1) when i call abc it retrun array xyz how can i do this
hint
xyz refer_xyz = new jkl();
but i can't create array.

2)I want to access method of jkl using reference of xyz??



my method "abc" return array of interface "xyz" and "pqr" is abstrac..

Answer / guest

ur public abstract class qpr implements xyz not abc
becoz abc is method

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is difference between throw and throws ?

0 Answers   Cyient,


How to pass arraylist to stored procedure in java?

0 Answers  


Difference between method overloading and overriding.

0 Answers  


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

0 Answers  


What are the supported platforms by java programming language?

0 Answers  


Explain the difference between runnable and callable interface in java?

0 Answers  


4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (

0 Answers  


Program to print 1 1 2 1 2 3 1 2 3 4 like that

8 Answers   Huawei,


What's the difference between comparison done by equals method and == operator?

0 Answers  


Do you need to import math in java?

0 Answers  


Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?

0 Answers  


Write a program to reverse a number in java?

0 Answers  


Categories