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

what is session in java?

0 Answers   Seventhsense Technologies,


Are arrays immutable in java?

0 Answers  


What is the USE of Null interfaces ??...if thers nothing inside these interfaces how are they used and WHy are they used ???? No 1 has given a proper description yet

1 Answers  


What are design patterns and please explain?

0 Answers  


Why string objects are immutable in java?

0 Answers  






What is Session reduplication and how its done?

0 Answers  


Describe string intern() methodology

0 Answers  


What must a class do to implement an interface in java programming?

0 Answers  


Explain the significance of class loaders in bootstrap?

0 Answers  


Is static a singleton?

0 Answers  


What are the Main functions of Java?

0 Answers   Akamai Technologies,


Does java support multiple inheritances?

0 Answers  


Categories