Amazon Interview Question for Development Support Engineers






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

I said int is a primitive data type and Integer is a wrapper class around it. The need for Integer is to have methods on the primitive data type like say conversion of an String to integer we user Integer.parseInt()

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

I said int is a primitive data type and Integer is a wrapper class around it. The need for Integer is to have methods on the primitive data type like say conversion of an String to integer we user Integer.parseInt()

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

IT is required to achieve portability between languages and platforms. All JVM compliant languages can use Integer type without having to worry about internal representation. Else code becomes language specific and platform specific. It is called Common Type system

- Anonymous September 23, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I agree with all above reasons but the main reason i think that makes the presence of Integer justified is its use in generics. How will otherwise you use int in an ArrayList or HashMap when you have no equals() or hashcode() method associated with it (since int is primitve and do not extend Object)

- am March 07, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

definitely....to make primitive data types as other class-objects..........an OOPs feature of java

- chandan.here4u May 22, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

I think Wrapper classes were part of java even before generics

- anshulzunke September 16, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

agreed with anshulzunke.

there were no primitive data types in the very first version of Java but this made the java language very slower, because it is expensive to have even the numbers in the object form.
That is when 'primitive data types' were introduced, which is why we can not say java is 100% object-oriented language.

- Sr March 16, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Integer class is available since v.1.0 of Java. It is wrapper for primitive "int".

- bamba May 10, 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