Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

1)Abstract Class has a constructor. Interface does not have a constructor.
2)Abstract Class can have non-abstract methods. Interface can only have abstract methods.
3)Abstract Class is a good choice when the design does not change or a default behavior is required for some of the methods.
Interface is a good choice when the design changes on a frequent note or no default behavior is required.

- badalrocks January 29, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

One more...
all methods are public in interfaces but abstract classes can have both public and private methods:)

- code_pro March 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

3rd point : is it not opposite ? I mean, when the design does not change you choose Interface ?

- Anonymous September 01, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

no. its not true.

- rb September 08, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

3rd Point : As per my understanding, that design change means about the default behavoiur.

- Akhil Chityal November 20, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

variables inside interface are by default final hence needs to be initialized.

- master January 01, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

one interface can extend many interfaces, but 1 abstract class can extend only 1 other class. so interfaces helps to provide the feature of multiple inheritance

- jango January 21, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

one interface can extend many interfaces, but 1 abstract class can extend only 1 other class. so interfaces helps to provide the feature of multiple inheritance in java.

- jango January 21, 2010 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More