Java Trainee

Java Trainee Interview Questions and Answers for Freshers

Updated 23 Feb 2022

Q1. Difference between collection and collections,

Ans.

Collection is an interface that represents a group of objects while Collections is a utility class that provides methods to operate on collections.

  • Collection is an interface while Collections is a class

  • Collection is used to represent a group of objects while Collections provides utility methods to operate on collections

  • Example of Collection: List, Set, Queue

  • Example of Collections: sort(), reverse(), shuffle()

Q2. Second largest number

Ans.

To find the second largest number in an array of integers.

  • Sort the array in descending order and return the second element.

  • Iterate through the array and keep track of the two largest numbers.

  • Use a priority queue to find the second largest element.

Java Trainee Jobs

Java Trainee 1-3 years
Amtex Systems
3.3
Chennai
Java Trainee 2-5 years
Telious Technologies Pvt
1.0
Kakinada
Are these interview questions helpful?
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10.5k Interviews
3.8
 • 8.2k Interviews
3.5
 • 3.8k Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Java Trainee Interview Questions
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
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

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