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



class{
...
...
interface myinterface{
...
...
}
abstract class{
..
..
}
...
..
..
}
is this possible to write "Interface and/ or Abstract class
inside a class ?
if possible whcich one is possible
is only interface?
is only abstract?

Answers were Sorted based on User's Feedback



class{ ... ... interface myinterface{ ... ... } abstract class{ .. .. } ... .. .. } ..

Answer / karunakaran

I have tried it.It is working.We can have abstract class
and/or interface inside a class.

Is This Answer Correct ?    13 Yes 0 No

class{ ... ... interface myinterface{ ... ... } abstract class{ .. .. } ... .. .. } ..

Answer / ranganathkini

Yes it is possible to write nested interfaces/abstract
classes inside another class.

Hope it is possible! :-)

Is This Answer Correct ?    12 Yes 1 No

Post New Answer

More Core Java Interview Questions

Can we inherit the constructor in a Class?please give one example.

9 Answers   iGate,


Can we override the main method?

4 Answers  


Can a static class implement an interface?

0 Answers  


what are the difference between Java and .Net?

5 Answers  


What are the main features of java?

0 Answers  


Why is string builder not thread safe?

0 Answers  


Difference between string s= new string (); and string s = "abv";?

0 Answers   Cap Gemini,


Can there be an abstract method without an abstract class?

0 Answers  


Can a class declared as private be accessed outside it’s package?

0 Answers  


What is deserialization and how do we do deserialization?

3 Answers   Synechron,


Differece between class and generic class?

0 Answers   Tech Mahindra,


Is it possible to do method overloading and overriding at a time

3 Answers   L&T,


Categories