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

how to create multithreaded program? : Java thread

0 Answers  


What is meant by 'bit masking' in java?

0 Answers   DELL,


Explain restrictions for using anonymous inner classes?

0 Answers  


What is the right data type to represent a price in java?

0 Answers  


What is meant by JVM? Is JVM platform independent or not?

0 Answers   Wipro,


What is the use of TL?

0 Answers  


What is the difference between reader/writer and inputstream/output stream?

0 Answers  


What is increment in java?

0 Answers  


When should you use arraylist and when should you use linkedlist?

0 Answers  


what is difference between class and object?

43 Answers   College School Exams Tests, HCL,


What is ph and buffers?

0 Answers  


State some situations where exceptions may arise in java?

0 Answers  


Categories