When should I use abstract classes and when should I use
interfaces?
Answers were Sorted based on User's Feedback
Answer / ved.b.tripathi
Interface : when you about to maintain the standard through
out the application then,blindly go with the interface.
Abstract : when you customize the behavior but still want to
maintain some standard then use abstract,because in abstract
you can have non abstract method that will be use by every
class that extend this abstract method and that class also
have to give the body of abstract methods(standard).
Is This Answer Correct ? | 15 Yes | 2 No |
Which method returns the length of a string?
What is the arguement of main method?
What is ternary operator in java?
how to print a numbers from 1 to 100 with out using control structures?
Can a for statement loop indefinitely?
Can we declare an anonymous class as both extending a class and implementing an interface?
8 Answers College School Exams Tests, JVA, TCS, Wipro,
What are the advantages of java over cpp?
Define inheritance with reference to java.
How do you stop a thread in java?
please tell me what is wrapper class in java with example ?
What is a class object?
what is mean by thread lock?