Amazon Interview Question for Software Engineer / Developers


Country: United States
Interview Type: Phone Interview




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

Generics were introduced to the Java language to provide tighter type checks at compile time and to support generic programming. To implement generics, the Java compiler applies type erasure to:

•Replace all type parameters in generic types with their bounds or Object if the type parameters are unbounded. The produced bytecode, therefore, contains only ordinary classes, interfaces, and methods.
•Insert type casts if necessary to preserve type safety.
•Generate bridge methods to preserve polymorphism in extended generic types.
Type erasure ensures that no new classes are created for parameterized types; consequently, generics incur no runtime overhead.

- gadolin July 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Generics in Java are only available at code level and not at runtime.

Java generics are based on type erasure.

So when the compiler translates sourcecodes, the types you specified for class A and class B are "erased". This means both types are set to java.lang.Object.

- vikash September 03, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

which interview did u giv?

- Anonymous July 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Oh stop the shameless promotions for other sites. I think it's legitimate to post a *direct link to a specific, single video* if the video answers *the exact question being asked*, but this is pretty close to just being spam.

- Anonymous July 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Yes My Videos are really cool Please promote if you like.... Thanks

- Saurabh July 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Where is the answer for this question

- loveCoding July 11, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

There doesn't seem to be one. If you want to build attention for your video lectures, I would recommend only posting links that directly answer the exact question being asked. What's your goal with these vids anyway?

- Anonymous July 12, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

And the lectures are definitely not exhaustive. You want exhaustive? That's this site.

- Anonymous July 12, 2012 | Flag
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

If you can't post a helpful answer, don't post at all.

- Anonymous July 12, 2012 | Flag


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