Bloomberg LP Interview Question for Software Engineer / Developers


Team: Supply Chain
Country: United States
Interview Type: In-Person




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

Abstract class may contain abstract as well as concrete methods but interface only contains abstract methods.This indicates that abstract class may provide partial implementation but interface don't.so using interface we can achieve 100% abstraction whereas using abstract class we can achieve partial abstraction.

- Anonymous December 12, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

When (sub) classes shares the common functionalities with the same logic, then it make sense to push this into an abstract class

- rp12 February 27, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Abstract classes can have constants, member, method and defined methods whereas interfaces can only have constant and methods.
You can defined any method in abstract class with different specifier but in interface must be defined as public.
When you inheritance any abstract class than you have to define the all abstract methods
and interface can extend or a class can implement multiple other interface.

- garryt December 23, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

A class is said to be abstract when it has one or more methods as abstract.

Abstract class is a class where as interface is not. We can define methods in abstract class whereas we can't in interface.

We use abstract classes instead of interface when we need different access type methods as interface can only have public.
Also if there are any updates(new methods) to an interface all the classes implementing it have to be updated and are required to implement it. Whereas in case of abstract a new method inside the abstract class is the only thing required without any change to the rest of the code.

- Suyash September 12, 2015 | 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