Add office photos
Newgen Software Technologies logo
Premium Employer

Newgen Software Technologies

3.7
based on 1.4k Reviews
Video summary
Filter interviews by
Java Developer
Experienced
Clear (1)

Newgen Software Technologies Java Developer Interview Questions and Answers

Updated 5 Feb 2024

Q1. Write a SQL query to find third highest salary from employee table.

Ans.

SQL query to find third highest salary from employee table.

  • Use the ORDER BY clause to sort the salaries in descending order

  • Use the LIMIT clause to limit the result to the third row

  • Use a subquery to exclude the highest and second highest salaries

Add your answer
right arrow

Q2. Write a program to count occurance the letter in a string.

Ans.

This program counts the occurrence of each letter in a given string.

  • Use a HashMap to store the count of each letter.

  • Iterate through the characters of the string and update the count in the HashMap.

  • Finally, print the count of each letter.

Add your answer
right arrow

Q3. What is the default size of an arraylist.

Ans.

The default size of an ArrayList is 10.

  • The default initial capacity of an ArrayList is 10.

  • If the number of elements exceeds the initial capacity, the ArrayList automatically increases its size.

  • The capacity of an ArrayList can be increased manually using the ensureCapacity() method.

Add your answer
right arrow

Q4. what is servlet life cycle

Ans.

Servlet life cycle refers to the sequence of events that occur during the lifespan of a servlet.

  • Servlet is loaded into memory when the server starts

  • init() method is called to initialize the servlet

  • service() method is called to handle client requests

  • destroy() method is called when the servlet is removed from memory

  • Servlet can be reloaded if the server is restarted

Add your answer
right arrow
Discover Newgen Software Technologies interview dos and don'ts from real experiences

Q5. what is try with resources

Ans.

Try with resources is a feature introduced in Java 7 to automatically close resources after use.

  • It simplifies the code by eliminating the need for a finally block to close the resource

  • The resource must implement the AutoCloseable interface

  • Multiple resources can be declared in a single try-with-resources statement

  • Example: try(FileInputStream fis = new FileInputStream("file.txt")) { //code }

Add your answer
right arrow

Q6. Difference between Array and arraylist.

Ans.

Array is a fixed-size data structure while ArrayList is a dynamic-size data structure in Java.

  • Array has a fixed length, while ArrayList can grow dynamically.

  • Array can store both primitive types and objects, while ArrayList can only store objects.

  • Array uses square brackets [] for declaration, while ArrayList uses angle brackets <>.

  • Array provides direct access to elements using index, while ArrayList provides methods for accessing and manipulating elements.

  • Example: String[] nam...read more

Add your answer
right arrow

Q7. Explain OOPs concepts.

Ans.

OOPs concepts are fundamental principles of object-oriented programming that help in designing and implementing software solutions.

  • Encapsulation: Bundling data and methods together in a class.

  • Inheritance: Creating new classes by inheriting properties and behaviors from existing classes.

  • Polymorphism: Ability of an object to take on many forms.

  • Abstraction: Hiding complex implementation details and providing a simplified interface.

  • Encapsulation, inheritance, and polymorphism tog...read more

Add your answer
right arrow

Q8. Explain working of Arraylist.

Ans.

ArrayList is a dynamic array that can grow or shrink in size. It stores objects and provides methods for adding, removing, and accessing elements.

  • ArrayList is part of the Java Collections Framework.

  • It is implemented as a resizable array.

  • Elements can be added using the add() method.

  • Elements can be accessed using the get() method.

  • Elements can be removed using the remove() method.

  • The size() method returns the number of elements in the ArrayList.

  • Example: ArrayList names = new Arr...read more

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Newgen Software Technologies Java Developer

based on 2 interviews
Interview experience
1.5
Bad
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Java Developer Interview Questions from Similar Companies

TCS Logo
3.7
 • 193 Interview Questions
Wipro Logo
3.7
 • 40 Interview Questions
NeoSOFT Logo
3.6
 • 18 Interview Questions
EPAM Systems Logo
3.7
 • 11 Interview Questions
View all
Recently Viewed
LIST OF COMPANIES
Discover companies
Find best workplace
SALARIES
Newgen Software Technologies
SALARIES
Newgen Software Technologies
SALARIES
Adani Ports and SEZ
INTERVIEWS
Newgen Software Technologies
No Interviews
SALARIES
Newgen Software Technologies
SALARIES
Newgen Software Technologies
INTERVIEWS
Newgen Software Technologies
No Interviews
INTERVIEWS
Newgen Software Technologies
No Interviews
SALARIES
Airports Authority of India
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

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