Add office photos
Engaged Employer

Tech Mahindra

3.6
based on 33.1k Reviews
Filter interviews by

Tunga Hotels Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What is inheritance and what is class and object

Ans.

Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class. A class is a blueprint for creating objects, while an object is an instance of a class.

  • Inheritance allows a class to reuse code from another class, promoting code reusability and reducing redundancy.

  • A class is a template or blueprint for creating objects, defining attributes and methods.

  • An object is an instance of a class, representing a specific entity...read more

Add your answer

Q2. What is oops concepts in Java

Ans.

Oops concepts in Java refer to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

  • Polymorphism: Ability of a method to do different things based on the object it is acting upon.

  • Abstraction: Hiding the implementation details and showing only the necessary feature...read more

Add your answer

Q3. What is a collections in java

Ans.

Collections in Java refer to classes and interfaces that implement data structures like lists, sets, and maps.

  • Collections provide a way to store and manipulate groups of objects in Java

  • Examples include ArrayList, LinkedList, HashSet, and HashMap

  • Collections framework includes interfaces like List, Set, Map, and classes like ArrayList, HashSet, and HashMap

Add your answer

Q4. What is list and set in java

Ans.

List and Set are both interfaces in Java used to store collections of elements, but with different characteristics.

  • List is an ordered collection that allows duplicate elements, while Set is an unordered collection that does not allow duplicates.

  • List implementations include ArrayList, LinkedList, and Vector, while Set implementations include HashSet, TreeSet, and LinkedHashSet.

  • List allows access to elements by index, while Set does not guarantee any specific order of elements....read more

Add your answer
Discover Tunga Hotels interview dos and don'ts from real experiences

Q5. Write a program of prime numbers

Ans.

Program to generate prime numbers

  • Create a function to check if a number is prime

  • Iterate through numbers and check for prime numbers

  • Store prime numbers in an array

Add your answer

Q6. Write. Program of palindrome program

Ans.

A palindrome program checks if a given string reads the same forwards and backwards.

  • Create a function that takes a string as input

  • Remove any spaces and convert all characters to lowercase

  • Compare the string with its reverse to check if it is a palindrome

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top System Engineer Interview Questions from Similar Companies

3.7
 • 597 Interview Questions
4.1
 • 20 Interview Questions
3.7
 • 13 Interview Questions
3.9
 • 12 Interview Questions
3.4
 • 12 Interview Questions
3.9
 • 11 Interview Questions
View all
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