Add office photos
Employer?
Claim Account for FREE

Morgan Stanley

3.7
based on 1.5k Reviews
Video summary
Filter interviews by

Visionet Systems Interview Questions and Answers

Updated 26 Oct 2024
Popular Designations

Q1. Max Element After Update Operations

Given an array A of size N, initialized with all zeros, and another array ARR of M pairs of integers representing operations. Each operation consists of a range where each el...read more

Ans.

Find the maximum element in an array after performing a series of increment operations on specified ranges.

  • Initialize an array of size N with all zeros

  • Iterate through the operations and increment elements within specified ranges

  • Return the maximum element in the array after all operations

Add your answer
Q2. How can you print even and odd numbers in increasing order using two threads in Java?
Ans.

Use two threads to print even and odd numbers in increasing order.

  • Create two threads, one for printing even numbers and one for printing odd numbers.

  • Use a shared variable to keep track of the current number to be printed.

  • Synchronize access to the shared variable to ensure correct ordering of numbers.

  • Use a loop in each thread to print the next number and update the shared variable.

View 1 answer
Q3. Can you explain the internal working of a hash map in Java?
Ans.

HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values based on keys.

  • HashMap internally uses an array of linked lists to store key-value pairs.

  • When a key-value pair is added, the key is hashed to find the index in the array where it will be stored.

  • If multiple keys hash to the same index, a linked list is used to handle collisions.

  • Retrieving a value involves hashing the key to find the index and then traversing the linke...read more

Add your answer
Q4. Why do we need to override the equals and hashCode methods in Java?
Ans.

Overriding equals and hashCode methods in Java is important for proper object comparison and hashing.

  • Equals method is used to compare two objects for equality, while hashCode method is used to generate a unique integer value for an object.

  • By overriding equals and hashCode methods, we can ensure that objects are compared based on their actual content rather than memory address.

  • This is crucial for collections like HashMap and HashSet, where proper implementation of equals and h...read more

Add your answer
Discover Visionet Systems interview dos and don'ts from real experiences
Q5. What are the differences between Synchronized Collection and Concurrent Collection in Java?
Ans.

Synchronized Collection is thread-safe but may have performance issues, while Concurrent Collection is optimized for concurrent access.

  • Synchronized Collection uses synchronized keyword to achieve thread-safety, while Concurrent Collection uses non-blocking algorithms like CAS (Compare and Swap).

  • Synchronized Collection locks the entire collection during modification, leading to potential performance bottlenecks, while Concurrent Collection allows multiple threads to access and...read more

Add your answer
Q6. What is the internal working of a CopyOnWrite ArrayList?
Ans.

CopyOnWriteArrayList creates a new copy of the underlying array whenever an element is added, modified, or removed.

  • CopyOnWriteArrayList is thread-safe and suitable for scenarios where reads are more frequent than writes.

  • Adding, modifying, or removing elements in CopyOnWriteArrayList creates a new copy of the underlying array, ensuring thread safety.

  • Iterators on CopyOnWriteArrayList operate on the original array and do not throw ConcurrentModificationException.

Add your answer

Q7. Reverse string with spaces but keep the space position intact

Ans.

Reverse a string while keeping the position of spaces intact

  • Split the string into an array of characters

  • Iterate through the array and reverse the characters while keeping track of space positions

  • Join the array back into a string

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Visionet Systems

based on 2 interviews
Interview experience
3.5
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Java Developer Interview Questions from Similar Companies

3.7
 • 193 Interview Questions
3.5
 • 54 Interview Questions
4.4
 • 43 Interview Questions
3.9
 • 20 Interview Questions
3.6
 • 10 Interview Questions
3.6
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter