Expedia Interview Question for Software Engineer in Tests


Team: SDET
Country: India
Interview Type: Phone Interview




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

System.gc() is equivalent to Runtime.getRuntime().gc(). Both suggest java for garbage collection
Note: its just a suggestion. gc is run by java.

- Prithvi May 16, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

18 down vote accepted


Both are same. System.gc() is effectively equivalent to Runtime.gc(). System.gc() internally calls Runtime.gc().

The only diff is System.gc() is a class method where as Runtime.gc() is an instance method. So, System.gc() is more convenient.

- Anonymous May 16, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I agree this is just a repository of questions in interview and will help a lot. Everyone can google it. dont give adivces ..

- MuralKB September 10, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

System.gc is a static invocation which internally will get a runtime object and calls gc method on it.

- MuraliKB September 10, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This seems like a bad interview question as calling the garbage collector is simply a suggestion to the JVM to run garbage collection and can be ignored. If you program's logic is dependent on garbage collector, then your program is faulty and needs to be redesigned.

- Anonymous June 23, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

Why can't you just google such basic things? There is horrendous amount of material on the internet for such simple things.

- Saurabh May 17, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

@Saurabh: You idiot. This site is a repository of interview questions. Do you really think people need help with the question _after_ the interview is over?

- Anonymous May 17, 2013 | 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