Global Healthcare Exchange

  www.ghx.com
  www.ghx.com

Interview Question

Java Developer Interview Louisville, CO

What is the difference between an abstract class and an

  interface?
Answer

Interview Answer

3 Answers

0

You can implement multiple interfaces in your subclass but inherit only one abstract class. Not all methods in an abstract class have to be declared "abstract

Interview Candidate on Apr 23, 2012
1

These are basic Java questions which every Java developer should know. If you were asked these questions, it was done so to gauge your overall knowledge of Java. These questions are in no way designed to "trip up" the interviewee.

Your answer shows that you really don't know what the main difference between an Interface and an Abstract class, namely that Interfaces do not provide implementations, whereas Abstract Classes can implement methods, but also define "abstract" methods that the children of this class need to implement.

It's very common for interviewers to ask questions like this to get an overall idea of your knowledge. If you do well with this question, then we would drill into more specific questions about the Java language. Once the interviewer feels comfortable with what you know, then questions about the types of technologies used are posed.

If you feel that the interviewer was trying to pose questions that would, as you put it "more about stumping the interviewee and gauging the reaction..", you're wrong! Maybe you should bone up on your Java skills before trying to find a job as a developer. I certainly wouldn't hire you.

Anon on Apr 5, 2013
0

Anon is a little hyper-defensive. You weren't the interviewer were you? Of course the answer can be expanded upon as you did (ad nauseum) but that doesn't make the short answer wrong. I wouldn't work for you so no worries.

Anonymous on Apr 5, 2013

Add Answers or Comments

To comment on this Question, Sign In with Facebook or Sign Up