Amazon Interview Question for Software Engineer in Tests






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

# We can not make instance of Abstract Class as well as Interface.
# Abstract class can contain abstract methods, abstract property as well as other members (just like normal class).

Interface can only contain abstract methods, properties but we don’t need to put abstract and public keyword. All the methods and properties defined in Interface are by default public and abstract.
# abstact class is a abstract view of any realword entity and interface is more abstract one

http://geekswithblogs.net/mahesh/archive/2006/07/05/84120.aspx

- googler August 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Within the confines of Java syntax, an interface is a type that only defines abstract methods and constant members. In a more general sense, an interface is an abstract class that defines no implementation. Neither an interface nor an abstract class can be directly instantiated. However, an abstract class may define non-constant members and non-abstract methods. An abstract class is often used to define the common set of features required of its implementing subclasses, including data structures and method implementations. An interface is used to define only the methods and constants that are to be shared by its implementers. You may implement an interface using the implements keyword and extend an abstract class using the extends keyword. When you implement an interface, you must provide the code for all of the methods in the interface. When you extend an abstract class, you inherit all of the implemented methods and only need to implement those that were left undefined (abstract).

- yahoo August 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

C# world
1. Interface allows multiple inheritances where abstract class not
2. all Interface methods are public by definition where abstract class can have different access level (private, protected and etc)
3. Abstract class can have implemetation of the method along with difiniton only where Interface only holds difinition

- Anonymous October 23, 2009 | 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