RoviCorp Interview Question for Java Developers


Country: India
Interview Type: In-Person




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

1) Aggregations and Compositions are both associations - For example, Student has brain. This is a composition - because life cycle of brain is only up-to the life of the student. Brain is created when the student is created but brain is destroyed when the student is destroyed.

But school has a list of students. This is a aggregation in the sense that when the student is destroyed , the school not going to be destroyed. When the school is destroyed, the student is not necessarily destroyed.

2 ) Enum is the special type in Java where the Objects are defined within the Enum. They are pre-defined. Whenever we have a pre-defined list of singleton objects or constants , we can make use of enums.

3) I use builder method a lot because it avoids painful large constructors. The builder method pattern where the director builds part of the objects one by one and finally the builder builds the entire object. For example , Employee builder , first builds personalInfo and then the JobInfo and then the EducationalInfo, finally they all together build the employee object.

4) Binary search code using Recursion:
BSTnode find ( BSTnode node, Object value )
{ BSTnode found = node;

// Node exists, but it is not the correct one. NOTE: it is critical that
// the base class "equals" of Object be overridden as appropriate.
if ( node != null && !value.equals(node.data) )
{
found = find ( node.left, value ); // Search left first
if ( found == null ) // Failed to find on left
found = find( node.right, value );// so search right
}

5) Man in the middle attack is for the security attack where a process in the middle hides and mediates a private commuication between two parties.

6) We create a svn branch by forking a master or another child branch.

- yesudas March 22, 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