Add office photos
Employer?
Claim Account for FREE

eClinicalWorks

3.9
based on 823 Reviews
Filter interviews by

10+ NTPC GE Power Services Interview Questions and Answers

Updated 7 Aug 2024
Popular Designations

Q1. Can we write controller annotation instead of service annotation

Ans.

No, controller and service annotations serve different purposes in a software application.

  • Controller annotations are used to define the entry points for incoming requests and map them to specific methods in a controller class.

  • Service annotations are used to mark a class as a service component that can be injected into other classes for business logic implementation.

  • Mixing up controller and service annotations can lead to confusion in the application structure and functionalit...read more

Add your answer

Q2. What is difference heap vs stack memory

Ans.

Heap memory is used for dynamic memory allocation, while stack memory is used for static memory allocation.

  • Heap memory is allocated at runtime and can be accessed randomly, while stack memory is allocated at compile time and is accessed in a LIFO order.

  • Heap memory is managed manually by the programmer, while stack memory is managed automatically by the system.

  • Heap memory is larger in size compared to stack memory, but slower in access speed.

  • Examples: Dynamic memory allocation...read more

Add your answer

Q3. What === parameter in javascript?

Ans.

=== is a strict equality operator in JavaScript that checks if two values are equal in type and value.

  • === compares two values without type conversion

  • Returns true if both values are strictly equal, false otherwise

  • Example: 5 === '5' returns false because they are of different types

Add your answer

Q4. What is immutable class ?

Ans.

Immutable class is a class whose instances cannot be modified after creation.

  • Instances of immutable class cannot be changed once created

  • Immutable classes are often used for objects that should not be modified, like dates or strings

  • Examples of immutable classes in Java are String, Integer, and LocalDate

Add your answer
Discover NTPC GE Power Services interview dos and don'ts from real experiences

Q5. How create immutable class?

Ans.

Immutable class can be created by making all fields private and final, providing only getters and no setters.

  • Make all fields private and final

  • Provide only getters, no setters

  • Avoid modifying state within the class

Add your answer

Q6. Difference between controller vs restcontroller

Ans.

Controller is a general term for classes that handle incoming requests, while RestController is specifically for RESTful web services in Spring.

  • Controller is a general term for classes that handle incoming requests in a web application.

  • RestController is a specialized version of a controller that is used for creating RESTful web services in Spring framework.

  • RestController is annotated with @RestController, which combines @Controller and @ResponseBody annotations.

  • RestController...read more

Add your answer

Q7. What is singleton class

Ans.

A singleton class is a class that can only have one instance created throughout the entire application.

  • Singleton classes are often used for logging, driver objects, caching, thread pools, database connections, etc.

  • They have a private constructor to prevent instantiation from other classes.

  • They provide a global point of access to the instance.

Add your answer

Q8. Write program for immutable class

Ans.

Immutable class is a class whose state cannot be modified after creation.

  • Use final keyword to make class immutable

  • Make all fields private and final

  • Do not provide setter methods

  • Return new instances when modifying state

Add your answer
Ans.

JSP stands for JavaServer Pages, a technology used for creating dynamic web pages using Java.

  • JSP allows embedding Java code in HTML pages

  • It is compiled into servlets by the server before execution

  • JSP simplifies the process of developing web applications by separating the presentation layer from the business logic

Add your answer

Q10. Write Immutable class program

Ans.

Immutable class program in Java

  • Use the 'final' keyword to make class immutable

  • Make all fields private and final

  • Do not provide setter methods, only getter methods

  • Ensure deep copy of mutable objects in constructor or getter methods

Add your answer

More about working at eClinicalWorks

HQ - Westborough, Massachusetts, United States (USA)
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
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