When we r go to abstract class and when we go to Interface?
i have confusion this question while in interview plz clarify

Answer Posted / arjun

In interface we can writer interface keyword and abstract we can write abstract class
In interface we can write constructor but abstract no
In interface we can forcely implement all methods but abstract no
In interface all variables public static final we can not change but abstract not

Is This Answer Correct ?    0 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes is 255 characters?

724


Why singleton is not thread safe?

749


How do you create immutable object in java?

738


How do you use spaces in java?

706


What does percent mean in java?

770






Why is multiple inheritance not supported in java?

745


What is the ==?

651


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

743


For class CFoo { }; what default methods will the compiler generate for you>?

801


You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain

717


What are the various access specifiers for java classes?

749


What are facelets templates?

768


What is the difference between super class & sub class?

772


Write a java program for binary search?

770


What is the structure of java?

726