Pentagon Space
10+ Manfront Staffing Services Interview Questions and Answers
Q1. How to create customized exceptions on basis of checked and unchecked
Customized exceptions can be created by extending the Exception class for checked exceptions and RuntimeException class for unchecked exceptions.
Create a new class that extends Exception for checked exceptions or RuntimeException for unchecked exceptions
Override the constructors to provide custom messages and error codes
Throw the customized exception in your code when necessary
Q2. Write a mysql query to display details of employees whose names starts with "ab"
Query to display details of employees whose names start with 'ab' in MySQL.
Use SELECT statement to retrieve data from the table.
Use WHERE clause with LIKE operator to filter names starting with 'ab'.
Example: SELECT * FROM employees WHERE name LIKE 'ab%';
Q3. Can u say a best example for immutable other than strings in java
Yes, an example of immutable object other than strings in Java is the Integer class.
Integer class in Java is immutable, meaning its value cannot be changed once it is created.
When you perform operations on an Integer object, a new Integer object is created with the result.
Example: Integer num = 10; num += 5; // num is now a new Integer object with value 15
Q4. Why synchronization is so necessary while creating a thread
Synchronization is necessary while creating a thread to ensure proper coordination and avoid conflicts between multiple threads accessing shared resources.
Prevents data corruption: Synchronization helps in preventing data corruption when multiple threads access shared data simultaneously.
Maintains order of execution: Synchronization ensures that threads execute in a specific order, preventing race conditions.
Avoids deadlock: Proper synchronization techniques help in avoiding ...read more
Q5. Write java program to check a strings are annagram in nature
Java program to check if strings are anagrams
Create a method that takes in two strings as parameters
Convert both strings to char arrays and sort them
Check if the sorted arrays are equal to determine if the strings are anagrams
Q6. How is daemon thread different from single thread
Daemon thread runs in the background and does not prevent the JVM from exiting, while single thread is a regular thread that can prevent the JVM from exiting.
Daemon thread is used for background tasks like garbage collection, while single thread is used for regular tasks.
Daemon thread does not prevent the JVM from exiting, while single thread can prevent the JVM from exiting.
Daemon threads are terminated by the JVM when all non-daemon threads have finished, while single threa...read more
Q7. How would you adopt agile methodologies in crm
Agile methodologies in CRM involve iterative development, frequent feedback, and collaboration.
Break down CRM projects into smaller tasks or user stories
Hold regular sprint planning meetings to prioritize tasks and set goals
Encourage cross-functional teams to work together and communicate effectively
Use tools like Jira or Trello to track progress and manage tasks
Conduct regular retrospectives to reflect on what went well and what can be improved
Q8. How service annotation works in springs
Service annotation in Spring is used to indicate that a class is a Spring bean and should be managed by the Spring container.
Service annotation is used to mark a class as a Spring bean
It eliminates the need for XML configuration for bean definition
It allows for automatic detection and registration of beans in the Spring container
Example: @Service annotation on a class named UserService
Q9. Properties of aggregate functions in mysql
Aggregate functions in MySQL are used to perform calculations on a set of values and return a single value.
Aggregate functions include functions like SUM, AVG, COUNT, MIN, and MAX.
They are often used with the GROUP BY clause to group the result set by one or more columns.
Aggregate functions ignore NULL values unless specified otherwise.
Examples: SELECT SUM(salary) FROM employees; SELECT AVG(age) FROM students;
Q10. How to create multithreading
Multithreading can be created in programming by creating multiple threads within a single process to execute tasks concurrently.
Use a programming language that supports multithreading, such as Java or C++.
Create a new thread by extending the Thread class or implementing the Runnable interface.
Start the thread using the start() method to execute the run() method concurrently.
Handle synchronization and communication between threads using techniques like locks, semaphores, or mo...read more
Reviews
Interviews
Salaries
Users/Month