Tietoevry
Leadec India Interview Questions and Answers
Q1. Hashmap hashtabe concurrent hashmap which to use and why in which scenario
ConcurrentHashMap is preferred for thread-safe operations, while HashMap and Hashtable are not.
HashMap is not thread-safe and should not be used in a multi-threaded environment.
Hashtable is thread-safe but has poor performance due to its synchronized nature.
ConcurrentHashMap is thread-safe and has better performance than Hashtable due to its lock-free approach.
Use ConcurrentHashMap when multiple threads are accessing the map concurrently.
Use HashMap when only a single thread ...read more
Q2. What is the code to reverse a string without reversing its words in C++?
This code reverses the characters of a string while keeping the order of words intact in C++.
Split the string into words using a space as a delimiter.
Reverse the entire string to get the characters in reverse order.
Reverse each individual word to restore their original order.
Example: Input: 'Hello World' -> Output: 'dlroW olleH'
Q3. What is the code implementation for deep copy and shallow copy in programming?
Deep copy creates a new object with copies of nested objects; shallow copy copies references to nested objects.
Shallow Copy: Copies the object's reference, not the actual object. Example: `list2 = list1.copy()`.
Deep Copy: Creates a new object and recursively copies all objects found in the original. Example: `import copy; list2 = copy.deepcopy(list1)`.
Shallow Copy is faster but can lead to unintended side effects if the original object is modified.
Deep Copy is slower but ensu...read more
Q4. What SQL query can be used to return results where the age is greater than 2?
Use a SQL query to filter records where age is greater than 2.
Basic SQL syntax: SELECT column_name FROM table_name WHERE condition;
Example query: SELECT * FROM users WHERE age > 2;
This query retrieves all records from the 'users' table where the age column has values greater than 2.
Ensure the 'age' column is of a numeric type to avoid errors.
Q5. Who calls the main method in java
The Java Virtual Machine (JVM) calls the main method in Java.
The main method is the entry point of a Java program.
It is declared as public static void main(String[] args)
The JVM searches for the main method in the class specified in the command line arguments.
If the main method is not found, the JVM throws a NoSuchMethodError.
Q6. Step to create rest api and rest client
To create a REST API, define endpoints and HTTP methods. To create a REST client, use a library or make HTTP requests.
Define endpoints and HTTP methods for the API
Implement the API using a framework or library
Test the API using tools like Postman
To create a REST client, use a library like Retrofit or make HTTP requests using a library like OkHttp
Parse the response from the API using a library like Gson
Q7. Project for final year
Developed a web-based project management system for a construction company.
Used PHP and MySQL for backend development.
Implemented a responsive UI using Bootstrap and jQuery.
Incorporated features such as task assignment, progress tracking, and document management.
Conducted user testing and made improvements based on feedback.
Completed the project within the given timeline and budget.
Q8. Make string palindrome
To make a string palindrome, reverse the string and append it to the original string.
Reverse the input string
Append the reversed string to the original string
Q9. Db queries of mongoDB
MongoDB queries are used to retrieve data from a MongoDB database.
Use find() method to retrieve documents from a collection
Use findOne() method to retrieve a single document
Use sort() method to sort the results
Use limit() method to limit the number of results returned
More about working at Tietoevry
Interview Process at Leadec India
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month