Amazon Interview Question for Development Support Engineers






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

I said that static methods are loaded first into the JVM and gave the example of main. Also said that they are class methods and an instance of the class is not required to call them. (this is the answer he is looking for)

- perllove January 19, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Plus they can access only static members of the class

- shri February 19, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Plus they can access only static members of the class

- Shri February 19, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Plus they can access only static members of the class

- Shri February 19, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Seriously? All the answers seem to be book definitions, if one of you guys answers me that that would be a red flag to me.

I'm not saying your answers are wrong, but it doesn't prove me that you know how to code (or have coded anything at all).

Static means that you can access a method in a class, even if that class is not instantiated.

For example:

Class Animal, has static method getFur()

There's no need to code:

Animal lion = new Animal()
lion.getFur();

If getFur is static, you can just do:
Animal lion;
lion.getFur();

No need to get deeper, if they want to know deep concepts, they'll ask.

- Alberto February 06, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

When the Object gets created its Class Instance is located in JVM Heap Memory the reference (The Address of the Object Heap ) is Stored in the Stack memory. All the Non Static elements of the class resides there only in the Stack of JVM. To access the local members of the Stack the JVM will require the object in the heap first then it gets the reference of the variable and methods from the stack. Hence for local members, Object creation is Important. As Static Lives in the HEAP only the JVM can access it directly. In this scenario object creation is not required. It gets the reference of elements directly from the heap only. That's the reason variable remains constant across classes and methods can be accessed without object creation.

- pritamclicks August 11, 2013 | 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