Caspex Blog

Interview questions Asked in Coforge

Certainly! Here are the interview questions rephrased in a clear format:

  1. SOLID Principles: Can you explain the SOLID principles in object-oriented programming and provide examples of how they can be applied?
  2. Array Manipulation: Given an array num = {1,2,3,-2,-4,-6,-7, 6, 9}, how would you move all positive numbers to one side and all negative numbers to the other side?
  3. Array Replacement: For the arrays nums1 = {12, 34, 45, 12, 34, 43} and nums2 = {43, 23, 12, 89, 1, 7}, how would you replace the first three elements of nums1 with the first three elements of nums2? What would be the resulting arrays?
  4. Concurrency Interfaces: What is the difference between the Callable and Runnable interfaces in Java?
  5. HashMap Behavior: What changes were made to the HashMap implementation in Java 8?
  6. Exception Handling in Spring Boot: How do you handle exceptions in a Spring Boot application?

These questions cover a range of topics from design principles and array manipulation to concurrency and exception handling in Java and Spring Boot. If you need detailed answers or code examples for any of these questions, please let me know!

Avatar

Neelabh

About Author

As Neelabh Singh, I am a Senior Software Engineer with 6.6 years of experience, specializing in Java technologies, Microservices, AWS, Algorithms, and Data Structures. I am also a technology blogger and an active participant in several online coding communities.

You may also like

Blog Design Pattern

Understanding the Builder Design Pattern in Java | Creational Design Patterns | CodeTechSummit

Overview The Builder design pattern is a creational pattern used to construct a complex object step by step. It separates
Blog Tech Toolkit

Base64 Decode

Base64 encoding is a technique used to encode binary data into ASCII characters, making it easier to transmit data over