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...

Under what circumstances an object reference be cast to an
interface reference?

Answer Posted / muthusenthil

when a class implements an interface then an object
referance of that class can be casted to interface referance

class A implements B{

public static void main(String args[]){
B b=new A();

}

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we break singleton in java?

918


How to access arraylist elements in java?

953


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

901


What is fail first in java?

1102


Is break statement can be used as labels in java?

925


What is constructor chaining and how is it achieved in java?

1082


What is the purpose of final keyword and when to use it?

959


Can we extend singleton class?

907


How to stop a thread in java? Explain about sleep () method in a thread?

981


Should you use singleton pattern?

904


How is garbage collection controlled?

1126


How do you sort data in java?

910


Can we pass a primitive type by reference in java? How

866


What is the program compilation process?

1043


What is the difference between integer parseint and integer valueof?

974