
CGI Group


30+ CGI Group Senior Software Engineer Interview Questions and Answers
Java is platform independent because it compiles code into bytecode that can run on any platform, while the JVM is platform dependent because it interprets bytecode into machine code specific to the underlying system.
Java code is compiled into bytecode, which is a platform-independent intermediate representation of the code.
The JVM interprets this bytecode and translates it into machine code that is specific to the underlying platform.
This allows Java programs to run on any p...read more
Use a common method like using CTE with ROW_NUMBER() function to delete duplicates from a table in SQL Server.
Use a common table expression (CTE) with ROW_NUMBER() function to assign a unique row number to each duplicate record.
Delete the duplicate records by filtering out rows with row number greater than 1.
Example: WITH CTE AS (SELECT *, ROW_NUMBER() OVER (PARTITION BY column1, column2 ORDER BY column3) AS rn FROM table_name) DELETE FROM CTE WHERE rn > 1;
setMaxResults() limits the number of results returned by a query, while setFetchSize() determines the number of rows fetched at a time from the database.
setMaxResults() is used to limit the number of results returned by a query.
setFetchSize() determines the number of rows fetched at a time from the database.
setMaxResults() is typically used for pagination purposes, while setFetchSize() can improve performance by reducing the number of round trips to the database.
Example: setM...read more
interrupted() checks if the current thread has been interrupted, while isInterrupted() checks if a thread has been interrupted.
interrupted() is a static method in the Thread class, while isInterrupted() is an instance method.
interrupted() clears the interrupted status of the current thread, while isInterrupted() does not.
Example: boolean interrupted = Thread.interrupted(); // clears interrupted status and returns true if interrupted
Data marts are subsets of data warehouses that focus on specific business areas or departments.
Types include dependent data marts, independent data marts, and hybrid data marts.
Dependent data marts rely on the data warehouse for data, while independent data marts do not.
Hybrid data marts combine elements of both dependent and independent data marts.
Examples include sales data mart, marketing data mart, and finance data mart.
Fact Table contains quantitative data and measures, while Dimension Table contains descriptive attributes.
Fact Table typically contains numerical data that can be aggregated (e.g. sales revenue, quantity sold)
Dimension Table contains descriptive attributes for the data in the Fact Table (e.g. product name, customer details)
Fact Table is usually normalized for efficient data storage and retrieval, while Dimension Table is denormalized for easier querying and reporting
Deploying a Big Data model involves several key steps to ensure successful implementation.
Prepare the data for deployment by cleaning and transforming it as needed
Choose the appropriate deployment environment such as on-premises or cloud
Implement the model using tools like Apache Spark or Hadoop
Monitor the performance of the deployed model and make necessary adjustments
Scale the deployment as needed to handle increasing data volume
Ensure security measures are in place to prot...read more
INNER JOIN returns rows when there is at least one match in both tables, while OUTER JOIN returns all rows from both tables.
INNER JOIN only returns rows that have matching values in both tables
OUTER JOIN returns all rows from both tables, even if there are no matches
Types of OUTER JOIN include LEFT JOIN, RIGHT JOIN, and FULL JOIN
Example: INNER JOIN would return only the customers who have made a purchase, while OUTER JOIN would return all customers with or without a purchase
Spring Boot offers basic annotations like @SpringBootApplication, @RestController, @Autowired, @RequestMapping, @ComponentScan, @Service, @Repository, @Configuration, @Bean.
@SpringBootApplication - Used to mark the main class of a Spring Boot application.
@RestController - Used to define a RESTful controller.
@Autowired - Used for automatic dependency injection.
@RequestMapping - Used to map web requests to specific handler methods.
@ComponentScan - Used to specify the base packa...read more
The @RestController annotation in Spring Boot is used to define a class as a RESTful controller.
Used to create RESTful web services in Spring Boot
Combines @Controller and @ResponseBody annotations
Automatically serializes return objects to JSON/XML
Maps HTTP requests to handler methods based on @RequestMapping annotations
ETL process involves extracting data from various sources, transforming it to fit the data warehouse schema, and loading it into the warehouse.
Extract: Data is extracted from different sources such as databases, files, APIs, etc.
Transform: Data is cleaned, filtered, aggregated, and transformed to match the data warehouse schema.
Load: Transformed data is loaded into the data warehouse for analysis and reporting.
Example: Extracting customer information from a CRM system, transf...read more
Hadoop is an open-source framework for distributed storage and processing of large data sets.
Core components include Hadoop Distributed File System (HDFS), Yet Another Resource Negotiator (YARN), and MapReduce.
HDFS is responsible for storing data across multiple machines in a Hadoop cluster.
YARN manages resources and schedules tasks across the cluster.
MapReduce is a programming model for processing and generating large data sets.
Other components like Hadoop Common, Hadoop Map...read more
N+1 SELECT problem in Hibernate occurs when a query results in N+1 database queries being executed instead of just one.
Occurs when a query fetches a collection of entities and then for each entity, another query is executed to fetch related entities individually
Can be resolved by using fetch joins or batch fetching to fetch all related entities in a single query
Example: Fetching a list of orders and then for each order, fetching the customer information separately
Hibernate provides several concurrency strategies like optimistic locking, pessimistic locking, and versioning.
Optimistic locking: Allows multiple transactions to read and write to the database without locking the data. Conflicts are resolved during transaction commit.
Pessimistic locking: Locks the data when it is read, preventing other transactions from modifying it until the lock is released.
Versioning: Uses a version number to track changes to entities. When an entity is u...read more
Packages in Java help organize code, prevent naming conflicts, and provide access control.
Organize code into logical groups for easier maintenance and readability
Prevent naming conflicts by using unique package names
Provide access control by using package-private, protected, public modifiers
Facilitate reusability by allowing classes in the same package to access each other's members
A degenerate dimension is a dimension that consists of attributes that are stored in the fact table instead of a separate dimension table.
Degenerate dimensions are typically used for attributes that are not easily categorized or do not have enough distinct values to warrant a separate dimension table.
Examples of degenerate dimensions include order numbers, invoice numbers, and transaction IDs.
These attributes are often used for grouping or filtering data within the fact table...read more
HDFS is the storage unit in Hadoop, providing fault-tolerant and scalable storage for big data.
HDFS divides data into blocks and stores them across multiple machines in a cluster.
It replicates data for fault tolerance, with default replication factor of 3.
HDFS supports streaming data access and is optimized for large sequential reads.
It provides high throughput and reliability for big data processing.
HDFS is suitable for storing and processing large datasets in parallel.
A thread pool is a collection of worker threads that are managed by the system to efficiently execute tasks.
Thread pools help improve performance by reusing threads instead of creating new ones for each task.
They limit the number of concurrent threads to prevent resource exhaustion.
Thread pools can be used in applications like web servers to handle multiple client requests efficiently.
Q19. write the queries to find out nth and 3rd highest record
Use SQL queries with ORDER BY and LIMIT to find nth and 3rd highest record.
Use ORDER BY column_name DESC to sort records in descending order
Use LIMIT 1 OFFSET n-1 to get the nth highest record
For 3rd highest record, use LIMIT 1 OFFSET 2
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Used to restrict the instantiation of a class to one object
Commonly used in scenarios where only one instance of a class is needed, such as database connections or configuration settings
Implemented by creating a static method that returns the same instance of the class every time it is called
Q21. 1. WAP to count the no of vowels in a given string using hash map . 2 . String related program. 3. Selenium basic 4 . Rest assured .
Count the number of vowels in a given string using a hash map.
Create a hash map to store the count of each vowel (a, e, i, o, u) in the string.
Iterate through the string and update the count in the hash map for each vowel encountered.
Finally, sum up the counts of all vowels in the hash map to get the total number of vowels in the string.
OLAP is used for complex analytical queries, while OLTP is used for transactional processing.
OLAP stands for Online Analytical Processing, while OLTP stands for Online Transactional Processing.
OLAP is designed for complex queries and data analysis, while OLTP is designed for fast and efficient transaction processing.
OLAP databases are optimized for read-heavy workloads, while OLTP databases are optimized for write-heavy workloads.
OLAP databases typically store historical data...read more
Dependency injection is a design pattern where components are provided with their dependencies rather than creating them internally.
Allows for easier testing by providing mock dependencies
Promotes loose coupling between components
Improves code reusability and maintainability
Examples: Constructor injection, Setter injection, Interface injection
Hibernate caching is a mechanism used to improve the performance of Hibernate applications by reducing the number of database queries.
Hibernate caching stores frequently accessed data in memory to reduce the need for repeated database queries.
There are different levels of caching in Hibernate, such as first-level cache and second-level cache.
First-level cache is associated with the Session object and is enabled by default.
Second-level cache is shared across multiple sessions ...read more
Q25. Integration with third party applications like microsoft dynamics and SAP
Integration with third party applications is crucial for seamless data flow and efficient business processes.
Experience with APIs and web services
Knowledge of data mapping and transformation
Familiarity with middleware solutions like MuleSoft and Dell Boomi
Ability to troubleshoot and debug integration issues
Examples: integrating Salesforce with SAP for order management, integrating Microsoft Dynamics with HubSpot for marketing automation
Q26. What programming language do you Know? What scripting language do you know
I know multiple programming and scripting languages.
Programming languages: Java, C++, Python, JavaScript
Scripting languages: Bash, PowerShell, Ruby
Examples: Java - used for building enterprise-level applications, Python - used for data analysis and machine learning
I am familiar with both object-oriented and functional programming paradigms
Q27. If "WAS" is shutdown are you ok with DEVops
Yes, I am comfortable with DEVops if WAS is shutdown.
I have experience with both WAS and DEVops
I understand the dependencies between the two systems
I am confident in my ability to troubleshoot and resolve any issues that may arise
Q28. List and Tuple bases Split string Remove spaces and special characters
List and Tuple bases, split string, remove spaces and special characters.
Use list comprehension to split string into individual characters
Use join() method to remove spaces and special characters
Convert the result back into a list or tuple
Q29. What are the annotation you have used
I have used annotations like @Override, @Deprecated, @SuppressWarnings in Java programming.
@Override - Indicates that a method overrides a method in its superclass
@Deprecated - Marks a method as deprecated, discouraging its use
@SuppressWarnings - Suppresses compiler warnings for a given type of annotation
Q30. What is sortcards how it is used
Sortcards is a utility program used for sorting data on punched cards in mainframe computers.
Sortcards is a utility program commonly used in mainframe computers to sort data on punched cards.
It is used to rearrange the order of data on punched cards based on specified criteria.
Sortcards can be used to sort data alphabetically, numerically, or based on custom sorting rules.
An example of using sortcards is sorting a deck of customer information cards by last name.
Q31. Write code for producer- consumer problem
Producer-consumer problem involves synchronization between two processes sharing a common buffer.
Use a shared buffer to store data produced by the producer and consumed by the consumer
Implement synchronization mechanisms like mutex or semaphore to control access to the shared buffer
Producer adds data to the buffer and notifies the consumer, while consumer removes data and notifies the producer
Q32. Content Migration approaches and scenarios
Content migration approaches and scenarios
Assess the source and target systems
Determine the scope of the migration
Choose the appropriate migration method (manual, automated, hybrid)
Plan for data mapping and transformation
Test the migration thoroughly before executing
Consider post-migration tasks such as data validation and cleanup
Q33. How to scale your microservices
Scaling microservices involves using containerization, load balancing, auto-scaling, and service discovery.
Use containerization tools like Docker or Kubernetes to easily deploy and manage microservices
Implement load balancing to distribute incoming traffic evenly across multiple instances of microservices
Utilize auto-scaling to automatically adjust the number of instances based on traffic demand
Employ service discovery mechanisms like Consul or Eureka to dynamically locate an...read more
Q34. How to reverse a linked list
To reverse a linked list, iterate through the list and change the direction of pointers.
Start with three pointers: current, previous, and next
Iterate through the list, updating the pointers to reverse the direction
Update the head of the list to be the previous node after reaching the end
Q35. What are steplib and jcl lib
Steplib and JCL lib are libraries used in mainframe programming for storing reusable code and job control language (JCL) statements.
Steplib is a library where commonly used program objects are stored for easy access in mainframe programming.
JCL lib is a library where job control language (JCL) statements are stored for reuse in mainframe batch processing.
Both steplib and JCL lib help in organizing and managing code and JCL statements efficiently in mainframe development.
Q36. What is constant pointer
A constant pointer is a pointer that cannot be reassigned to point to a different memory location.
A constant pointer is declared using the 'const' keyword before the pointer type.
Once a constant pointer is assigned a memory address, it cannot be changed to point to a different address.
Example: const int *ptr; // ptr is a constant pointer to an integer
More about working at CGI Group







Top HR Questions asked in CGI Group Senior Software Engineer
Interview Process at CGI Group Senior Software Engineer

Top Senior Software Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

