Add office photos
Engaged Employer

Cognizant

3.8
based on 47.9k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

Georgia Foods Company Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Write a code of Prime number which are printed in the Right angle triangle format.

Ans.

Code to print prime numbers in right angle triangle format.

  • Create a function to check if a number is prime or not.

  • Use nested loops to print the numbers in right angle triangle format.

  • Start with the first prime number and keep adding prime numbers to the triangle.

  • Example: 2 3 5 7 11 13 17 19 23 29

View 1 answer

Q2. Do you know 4 pillars of OOP? Explain.

Ans.

The 4 pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.

  • Abstraction: Hiding implementation details and showing only necessary information.

  • Encapsulation: Binding data and functions together to prevent external interference.

  • Inheritance: Creating new classes from existing ones, inheriting properties and methods.

  • Polymorphism: Using a single interface to represent multiple types of objects.

View 2 more answers

Q3. What approach did you take to learn data science?

Ans.

I took a structured approach to learn data science.

  • Started with learning the basics of statistics and programming

  • Took online courses and read books on data science

  • Practiced on real-world datasets and participated in Kaggle competitions

  • Joined a data science community to learn from others and share knowledge

  • Continuously updated my skills and knowledge through online resources and attending conferences

View 1 answer

Q4. Exception handling in Java. Try catch finally. Types of Exceptions ans etc.

Ans.

Exception handling in Java involves using try-catch-finally blocks to handle and manage exceptions.

  • Java provides a mechanism to handle runtime errors called exceptions.

  • The try block is used to enclose the code that might throw an exception.

  • The catch block is used to catch and handle the exception.

  • The finally block is used to execute code regardless of whether an exception occurred or not.

  • There are two types of exceptions: checked exceptions and unchecked exceptions.

  • Checked ex...read more

View 1 answer
Discover Georgia Foods Company interview dos and don'ts from real experiences

Q5. How multiple inheritance can be achieved in java?

Ans.

Java does not support multiple inheritance, but it can be achieved using interfaces.

  • Java supports multiple interface inheritance.

  • A class can implement multiple interfaces.

  • Interfaces can have default methods with implementation.

  • Example: class A implements Interface1, Interface2 {}

Add your answer

Q6. 1.Prime number 2.reverse a string 3.Palindrome Numbers

Ans.

Answering questions related to prime numbers, reversing strings, and palindrome numbers.

  • A prime number is a number that is only divisible by 1 and itself, such as 2, 3, 5, 7, 11, etc.

  • To reverse a string, you can use a loop to iterate through the string and append each character to a new string in reverse order.

  • Palindrome numbers are numbers that read the same backward as forward, such as 121, 1331, 1441, etc.

Add your answer

Q7. difference between unchecked and checked exception

Ans.

Checked exceptions are checked at compile-time while unchecked exceptions are not.

  • Checked exceptions are those that are checked at compile-time and must be handled by the programmer using try-catch or throws clause.

  • Unchecked exceptions are those that are not checked at compile-time and can occur at runtime, such as NullPointerException or ArrayIndexOutOfBoundsException.

  • Checked exceptions are usually used for recoverable errors, while unchecked exceptions are used for unrecove...read more

Add your answer

More about working at Cognizant

Top Rated Mega Company - 2024
Top Rated IT/ITES Company - 2024
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter