Add office photos
Employer?
Claim Account for FREE

C-Edge Technologies

3.9
based on 345 Reviews
Filter interviews by

Interview Questions and Answers

Updated 18 Nov 2024
Popular Designations

Q1. What is difference between runnable and callable in java?

Ans.

Runnable is a functional interface with a run() method, while Callable is a functional interface with a call() method that can return a result or throw an exception.

  • Runnable does not return a result or throw a checked exception, while Callable can return a result or throw a checked exception.

  • Callable is used in scenarios where you need to return a result or handle checked exceptions, while Runnable is used for simple tasks that do not require a return value.

  • Example: Runnable ...read more

Add your answer

Q2. How does spring auto configuration works?

Ans.

Spring auto configuration automatically configures Spring beans based on classpath and property settings.

  • Spring scans classpath for certain annotations like @Component, @Service, @Repository, @Controller, etc.

  • Based on these annotations and property settings, Spring automatically configures beans.

  • Auto configuration can be customized using @Conditional annotations or configuration classes.

  • Example: @SpringBootApplication annotation triggers auto configuration for Spring Boot app...read more

Add your answer

Q3. Tell me about transaction management in spring.

Ans.

Transaction management in Spring helps in managing database transactions in a consistent and reliable manner.

  • Spring provides support for both programmatic and declarative transaction management.

  • Programmatic transaction management involves handling transactions in code using TransactionTemplate or PlatformTransactionManager.

  • Declarative transaction management involves using annotations like @Transactional to define transactional behavior at the method or class level.

  • Spring supp...read more

Add your answer

Q4. Why Strings are immutable in java?

Ans.

Strings are immutable in Java to ensure thread safety, security, and optimization.

  • Immutable strings are thread-safe as they cannot be modified concurrently by multiple threads.

  • Immutable strings enhance security by preventing malicious code from altering the string content.

  • String interning is possible due to immutability, allowing for memory optimization.

  • Examples: String str = "Hello"; str.concat(" World"); // This does not modify str, but creates a new string

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

Q5. What is exception propogation in java?

Ans.

Exception propagation in Java is the process of passing an exception from one method to another in the call stack.

  • Exceptions can be thrown in a method and propagated up the call stack until they are caught and handled.

  • If an exception is not caught in a method, it will be propagated to the calling method.

  • This continues until the exception is caught or reaches the top of the call stack.

  • Example: If a method 'A' calls method 'B' and an exception occurs in 'B', it will be propagat...read more

Add your answer

Q6. Expalin JDBC and return type of statement?

Ans.

JDBC is a Java API for connecting and executing SQL queries on databases. The return type of a statement in JDBC is boolean.

  • JDBC stands for Java Database Connectivity.

  • It allows Java programs to interact with databases using SQL queries.

  • The return type of a statement in JDBC is boolean, indicating whether the query was successfully executed.

Add your answer

Q7. Second level cache in hibernate?

Ans.

Second level cache in Hibernate is used to cache data at the session factory level to reduce database hits.

  • Second level cache stores objects across sessions to reduce database calls

  • Improves performance by reducing database hits

  • Configurable cache providers like Ehcache, Infinispan can be used

Add your answer

Q8. What are arrays

Ans.

Arrays are a data structure that stores a collection of elements of the same data type in a contiguous memory location.

  • Arrays have a fixed size determined at the time of declaration.

  • Elements in an array are accessed using an index starting from 0.

  • Example: String[] names = new String[5];

Add your answer

Q9. Data structures in java

Ans.

Data structures in Java are used to store and organize data efficiently.

  • Java provides built-in data structures like arrays, lists, sets, maps, queues, and stacks.

  • Arrays are used to store a fixed-size collection of elements of the same data type.

  • Lists like ArrayList and LinkedList can dynamically grow and shrink in size.

  • Sets ensure unique elements and maps store key-value pairs.

  • Queues follow the FIFO (First In First Out) principle, while stacks follow the LIFO (Last In First O...read more

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

Interview Process at null

based on 4 interviews in the last 1 year
1 Interview rounds
One-on-one 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
 • 51 Interview Questions
3.7
 • 39 Interview Questions
3.8
 • 21 Interview Questions
3.6
 • 12 Interview Questions
3.7
 • 10 Interview Questions
3.6
 • 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
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