Autocoder

Coforge Interview Questions for Freshers

Last updated 2026-11-19

Coforge works with clients in sectors such as banking, insurance and travel, and its fresher interviews are commonly Java, SQL and project oriented. These twelve worked practice questions cover Java, Spring, SQL, JavaScript, testing and HR.

For general preparation use how to crack the technical interview; for coding practice see Coforge coding round questions.

RoundsNot published; test, technical and HR commonly reported
Typical focusJava, Spring Boot, SQL, JavaScript, testing
CareersCompany's own careers site

Coforge rounds as commonly reported

Coforge's fresher selection steps are not published in a source we could cite, so the following is general: prep material for IT services drives describes an online test with aptitude and technical questions (sometimes with coding), a technical interview covering programming, databases and your project, and an HR interview. Details vary by role, college and year, and the invitation you receive is the authority.

Topics that suit Coforge-style roles

Hiring status

This page does not track Coforge drives or dates. For anything time-sensitive, use Coforge's own careers site (the careers section of coforge.com) and treat any date quoted on social media or listing sites as unconfirmed until it appears there.

No hiring figures are quoted on this page because there is no sourced statement to cite.

Coforge Interview Questions for Freshers: questions with worked answers

  1. 1

    Why Coforge?

    easy

    Coforge is an IT services company with long-standing work in sectors such as banking, insurance and travel, so a fresher can talk about wanting to build business-critical systems. Add a specific technical interest, for example Java microservices or testing automation, plus something you have already built. Keep company claims to what is on its own website, and avoid repeating generic praise.

  2. 2

    What are Optional and functional interfaces in Java 8?

    medium

    A functional interface has exactly one abstract method (Runnable, Comparator, Function) and can be implemented with a lambda; @FunctionalInterface makes the compiler check it. Optional is a container that may or may not hold a value, used as a return type to make absence explicit instead of returning null: Optional.ofNullable(x).map(String::trim).orElse("none"). Do not use Optional for fields or method parameters, and avoid calling get() without checking isPresent, which defeats its purpose.

  3. 3

    Explain @RestController, @Service and @Repository in Spring Boot.

    easy

    They are stereotype annotations marking beans. @RestController combines @Controller and @ResponseBody, so methods return data (usually JSON) directly. @Service marks business logic classes. @Repository marks data access classes and also enables translation of persistence exceptions into Spring's DataAccessException. Layering controller to service to repository keeps HTTP concerns, rules and storage separate, which makes each testable on its own.

  4. 4

    Synchronous versus asynchronous communication between microservices, and what is Kafka used for?

    medium

    Synchronous calls (REST or gRPC) are simple and give an immediate answer but couple services in time: if one is slow or down, callers suffer, so add timeouts, retries and circuit breakers. Asynchronous messaging through a broker decouples services: a producer publishes an event and consumers process it when ready. Kafka is a distributed log that stores events in partitioned topics, lets multiple consumer groups read independently, and retains data for replay. Use it for event streams, not for request-response lookups.

  5. 5

    Find customers who bought both product A and product B.

    medium

    Group the purchases by customer, keep only the two products of interest and require that both distinct products appear. The HAVING COUNT(DISTINCT product) = 2 pattern generalises to any number of required items, and avoids a self-join. Indexes on customer and product make it efficient at scale.

    sql
    SELECT customer_id
    FROM purchases
    WHERE product IN ('A', 'B')
    GROUP BY customer_id
    HAVING COUNT(DISTINCT product) = 2;
  6. 6

    When does a database index not help?

    hard

    An index is skipped when the query cannot use its ordering. Examples: a LIKE pattern with a leading wildcard ('%smith'), a function applied to the indexed column (WHERE YEAR(created) = 2025, instead of a date range), implicit type conversion such as comparing a string column to a number, low-selectivity columns such as a boolean where most rows match, and queries reading most of the table anyway. Composite indexes follow the leftmost-prefix rule. Check with EXPLAIN rather than guessing.

  7. 7

    Comparable versus Comparator in Java.

    easy

    Comparable defines a class's natural ordering through compareTo, implemented inside the class, so there is only one such ordering. Comparator is a separate object with compare(a, b), so you can have many orderings without touching the class, for example employees by salary or by name. Comparator.comparing(Employee::getSalary).thenComparing(Employee::getName) chains criteria. Both must be consistent: return negative, zero or positive, and avoid subtraction that can overflow.

  8. 8

    var, let and const in JavaScript, and what is a closure?

    medium

    var is function-scoped and hoisted with the value undefined; let and const are block-scoped and sit in a temporal dead zone until declared; const prevents reassignment but not mutation of an object. A closure is a function that remembers variables from the scope where it was created, even after that scope has finished: function counter() { let n = 0; return () => ++n; } returns a function with private state. Closures power callbacks, modules and the classic loop bug with var and setTimeout.

  9. 9

    What is a context switch and what is thrashing?

    medium

    A context switch saves the state of the running process or thread (registers, program counter, memory mappings) and restores another's, letting the CPU be shared; it costs time and cache warmth, so too many switches waste CPU. Thrashing happens when a system spends more time swapping pages in and out than doing useful work, because processes' working sets do not fit in memory; page fault rates soar and CPU utilisation falls. Fixes include more memory, fewer concurrent processes and better replacement or working-set policies.

  10. 10

    How do you unit test a service that calls a repository, using Mockito?

    medium

    Mock the repository so the test does not need a database: create it with Mockito.mock or @Mock, inject it into the service, stub behaviour with when(repo.findById(1L)).thenReturn(Optional.of(user)), call the service method, assert the result and verify interactions with verify(repo).findById(1L). Test the unhappy path too, such as an empty Optional leading to a NotFoundException. Use a real database test (integration test) separately to verify the queries themselves.

  11. 11

    What does print(0.1 + 0.2 == 0.3) show in Python and why?

    medium

    It prints False. Binary floating point cannot represent 0.1 and 0.2 exactly, so the sum is 0.30000000000000004. Compare floats with a tolerance, using math.isclose(a, b) or abs(a - b) < 1e-9, and use the decimal module or integers in paise for money. The same issue exists in Java and every language using IEEE 754 doubles. See Python interview questions for more such traps.

  12. 12

    How would you handle a client request that conflicts with the agreed scope?

    medium

    Stay calm and process-oriented: acknowledge the request, check it against the agreed scope, tell your lead rather than agreeing or refusing on the spot, and let the project manager discuss change impact on time and cost. A fresher is rarely the one to negotiate, but showing you know to escalate with facts is a good answer. Give a college-project parallel if you have no work experience, such as a professor adding a requirement late.

Frequently asked questions

What technical areas does Coforge ask?

There is no published list. Java, SQL, your project and role-specific tools are common.

Is Spring Boot compulsory?

No, but many Java roles use it. Know what your resume lists.

Does Coforge have a coding test?

Prep material commonly reports one for technical roles; confirm with your invitation.

How do I check openings?

Use Coforge's own careers site; this page does not track drives.

Related guides

More in Company Interview Questions

See all in this section