Add office photos
Employer?
Claim Account for FREE

Excelon Solutions

3.1
based on 11 Reviews
Filter interviews by

10+ Digital Folks Interview Questions and Answers

Updated 19 Jun 2024

Q1. Write code to get the Dept from Dept table where dept id in emp and Dept table point to the same employee

Ans.

Join Dept table with emp table on dept id to get department of employees

  • Use SQL JOIN to connect Dept and emp tables on dept id

  • Select the Dept column from Dept table to get the department of employees

Add your answer

Q2. Write code to add employee table into the db using Spring boot app and retrieve data of employee with the second highest salary

Ans.

Code to add employee table in db using Spring Boot app and retrieve data of employee with second highest salary

  • Create Employee entity class with fields like id, name, salary

  • Create EmployeeRepository interface extending JpaRepository

  • Implement service class with methods to add employee to db and retrieve employee with second highest salary

  • Use @Query annotation in repository to write custom query to retrieve employee with second highest salary

Add your answer

Q3. Why is there no multiple inheritance in Java?

Ans.

Java does not support multiple inheritance to avoid the diamond problem and maintain simplicity and clarity in the language.

  • Java supports single inheritance to prevent the diamond problem, where conflicts arise when a class inherits from two classes that have a common ancestor.

  • Multiple inheritance can lead to ambiguity and complexity in the code, making it harder to understand and maintain.

  • Java allows multiple interface inheritance to achieve code reusability without the issu...read more

Add your answer

Q4. Explain difference between final, finalize and finally

Ans.

final is a keyword used to declare constants, finalize is a method used for cleanup operations, and finally is a block used for exception handling.

  • final is used to declare constants in Java

  • finalize is a method in Java used for cleanup operations before an object is garbage collected

  • finally is a block used in exception handling to ensure a piece of code is always executed

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

Q5. Difference between Spring and Spring boot frameworks

Ans.

Spring is a framework for building Java applications, while Spring Boot is an extension that simplifies the setup and development process.

  • Spring is a comprehensive framework that provides support for various Java technologies like JDBC, JPA, and REST.

  • Spring Boot is an opinionated extension of Spring that aims to simplify the setup and development of Spring applications by providing defaults for configuration.

  • Spring Boot includes embedded servers like Tomcat, Jetty, or Underto...read more

Add your answer

Q6. How to connect db to Springboot app

Ans.

Use Spring Data JPA to connect a database to a Spring Boot application.

  • Add the necessary dependencies in the pom.xml file for Spring Data JPA and the database driver.

  • Configure the database connection properties in the application.properties file.

  • Create a repository interface that extends JpaRepository to interact with the database.

  • Use annotations such as @Entity, @Table, @Id, @Column, etc., to map Java objects to database tables.

  • Inject the repository interface into your servi...read more

Add your answer

Q7. Difference between static and non static methods

Ans.

Static methods belong to the class itself, while non-static methods belong to instances of the class.

  • Static methods can be called without creating an instance of the class.

  • Non-static methods require an instance of the class to be created before they can be called.

  • Static methods cannot access instance variables, while non-static methods can.

  • Example: Math.sqrt() is a static method, while String.length() is a non-static method.

Add your answer

Q8. Difference between constructor and method

Ans.

Constructor is a special method used to initialize an object, while a method is a function associated with an object to perform a specific task.

  • Constructor is called automatically when an object is created, while a method is called explicitly by the programmer.

  • Constructors have the same name as the class, while methods have unique names.

  • Constructors do not have a return type, while methods can have a return type.

  • Example: Constructor - public ClassName() { // initialization co...read more

Add your answer

Q9. Different injections in Spring boot

Ans.

Different types of injections in Spring Boot include constructor injection, setter injection, and field injection.

  • Constructor injection: Dependencies are provided through a class constructor.

  • Setter injection: Dependencies are set through setter methods.

  • Field injection: Dependencies are injected directly into class fields.

Add your answer

Q10. Different access keywords for methods

Ans.

Access keywords control the visibility and accessibility of methods in a class.

  • public: accessible from any class

  • private: only accessible within the same class

  • protected: accessible within the same class and its subclasses

  • default (no keyword): accessible within the same package

Add your answer
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

Top Software Developer Interview Questions from Similar Companies

4.1
 • 149 Interview Questions
3.9
 • 93 Interview Questions
3.8
 • 28 Interview Questions
3.1
 • 19 Interview Questions
3.8
 • 15 Interview Questions
3.9
 • 14 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