Add office photos
UBS logo
Engaged Employer

UBS

Verified
3.9
based on 2.8k Reviews
Video summary
Filter interviews by
Java Developer
Clear (1)

UBS Java Developer Interview Questions and Answers

Updated 7 Aug 2024

Q1. Where we store the object of string

Ans.

Objects of String are stored in the String Pool in Java.

  • String objects are stored in the String Pool, a special memory area in Java heap memory.

  • String literals are automatically stored in the String Pool.

  • String objects created using the new keyword are not stored in the String Pool.

  • String.intern() method can be used to store a String object in the String Pool.

Add your answer
right arrow

Q2. What is query parameters and path param

Ans.

Query parameters are used to pass data to a web server through the URL, while path parameters are part of the URL itself.

  • Query parameters are key-value pairs added to the end of a URL after a '?'

  • Path parameters are variables within the URL path itself, denoted by curly braces {}

  • Example of query parameter: www.example.com/api/users?id=123

  • Example of path parameter: www.example.com/api/users/{userId}

Add your answer
right arrow

Q3. What is bean in springboot

Ans.

A bean in Spring Boot is a Java object that is instantiated, assembled, and managed by the Spring IoC container.

  • Beans are defined in the Spring configuration file or using annotations like @Component, @Service, @Repository, etc.

  • Beans are singleton by default but can be scoped as prototype, request, session, etc.

  • Beans are injected into other beans using dependency injection.

  • Example: @Component annotation is used to define a bean in Spring Boot.

Add your answer
right arrow

Q4. Difference between HashMap and ConcurentHashMap

Ans.

HashMap is not thread-safe while ConcurrentHashMap is thread-safe.

  • HashMap is not thread-safe and can cause ConcurrentModificationException if modified while iterating.

  • ConcurrentHashMap allows concurrent modifications without causing any exception.

  • ConcurrentHashMap achieves thread-safety by dividing the map into segments and locking only a portion of the map during updates.

  • ConcurrentHashMap is suitable for high-concurrency scenarios where multiple threads are accessing and mod...read more

Add your answer
right arrow
Discover UBS interview dos and don'ts from real experiences

Q5. Diff between exception and error

Ans.

Exceptions are recoverable errors that can be handled in code, while errors are unrecoverable issues that usually result in program termination.

  • Exceptions are checked at compile time, while errors are unchecked.

  • Exceptions are subclasses of Throwable, while errors are subclasses of Error.

  • Examples of exceptions include FileNotFoundException, NullPointerException, while examples of errors include OutOfMemoryError, StackOverflowError.

Add your answer
right arrow

Q6. Java 8 new features

Ans.

Java 8 introduced several new features including lambda expressions, streams, functional interfaces, and default methods.

  • Lambda expressions allow you to write code in a more concise and readable way.

  • Streams provide a way to work with sequences of elements and perform operations on them.

  • Functional interfaces are interfaces with a single abstract method, which can be implemented using lambda expressions.

  • Default methods allow interfaces to have method implementations.

  • Some other ...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 UBS Java Developer

based on 4 interviews
1 Interview rounds
Technical Round
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
Cognizant Logo
3.7
 • 21 Interview Questions
NeoSOFT Logo
3.7
 • 18 Interview Questions
View all
Recently Viewed
COMPANY BENEFITS
State Street Syntel
No Benefits
INTERVIEWS
CAMS
No Interviews
INTERVIEWS
UBS
No Interviews
REVIEWS
State Street Syntel
No Reviews
REVIEWS
Indusind Marketing & Financial Services
No Reviews
INTERVIEWS
CAMS
No Interviews
REVIEWS
SBI Securities
No Reviews
SALARIES
American Express
JOBS
American Express
No Jobs
INTERVIEWS
CAMS
No Interviews
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