Add office photos
Engaged Employer

TCS

3.7
based on 88.3k Reviews
Video summary
Filter interviews by

UST Interview Questions and Answers

Updated 28 Jan 2025
Popular Designations

Q1. What is compile time polymorphism and runtime polymorphism?

Ans.

Compile time polymorphism is achieved through method overloading, while runtime polymorphism is achieved through method overriding.

  • Compile time polymorphism is also known as static polymorphism.

  • It is achieved by having multiple methods in the same class with the same name but different parameters.

  • Example: method overloading in Java.

  • Runtime polymorphism is also known as dynamic polymorphism.

  • It is achieved by having a method in a superclass and a method with the same signature ...read more

Add your answer

Q2. how to handle exception in spring boot?

Ans.

Exceptions in Spring Boot can be handled using try-catch blocks, @ExceptionHandler annotation, and global exception handling.

  • Use try-catch blocks to handle exceptions within a specific method.

  • Use @ExceptionHandler annotation to handle exceptions at the controller level.

  • Implement a global exception handler using @ControllerAdvice and @ExceptionHandler annotations.

  • Customize error responses using ResponseEntityExceptionHandler.

  • Use @ResponseStatus annotation to specify the HTTP s...read more

View 1 answer

Q3. what is a classLoader?

Ans.

A classLoader is a part of the Java Runtime Environment that dynamically loads Java classes into the Java Virtual Machine.

  • ClassLoader is responsible for loading classes at runtime in Java.

  • It follows a delegation hierarchy to search for classes.

  • There are different types of class loaders like Bootstrap, Extension, and System class loaders.

  • Custom class loaders can be created to load classes from different sources like network or database.

Add your answer

Q4. what is Polymorphism?

Ans.

Polymorphism is the ability of an object to take on multiple forms.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).

  • Example: Animal superclass with Dog and Cat subclasses, both overriding the makeSound() method.

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

Q5. What is constructor?

Ans.

Constructor is a special method that is used to initialize objects in Java.

  • Constructor has the same name as the class name

  • It does not have a return type

  • It can be overloaded

  • It is called automatically when an object is created

  • Example: public class Car { public Car() { // constructor code here } }

Add your answer

Q6. what is Truncate

Ans.

Truncate is a SQL command used to delete all rows from a table without logging the individual row deletions.

  • Truncate is a DDL (Data Definition Language) command in SQL.

  • It is used to quickly delete all rows from a table, but it does not log individual row deletions.

  • Truncate is faster than using the DELETE command, as it does not generate individual row deletion logs.

  • Truncate also resets any auto-incrementing keys in the table.

  • Example: TRUNCATE TABLE table_name;

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

Interview Process at UST

based on 12 interviews
3 Interview rounds
Technical Round
Coding Test Round
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Java Developer Interview Questions from Similar Companies

3.6
 • 164 Interview Questions
3.9
 • 53 Interview Questions
3.3
 • 24 Interview Questions
4.0
 • 18 Interview Questions
3.5
 • 18 Interview Questions
4.4
 • 10 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

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