Add office photos
Engaged Employer

LTIMindtree

3.8
based on 18.9k Reviews
Filter interviews by

1Digital Stack Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. What are the advantages of multithreading?

Ans.

Multithreading allows for concurrent execution of multiple threads, improving performance and responsiveness.

  • Multithreading can improve CPU utilization by allowing multiple threads to execute simultaneously.

  • It can also improve application responsiveness by allowing tasks to be executed in the background while the main thread continues to run.

  • Multithreading can be used for parallel processing, such as in scientific simulations or video encoding.

  • It can also be used for asynchro...read more

Add your answer

Q2. What is the purpose of wait() method in Java?

Ans.

wait() method in Java is used to make a thread wait until another thread completes its execution.

  • wait() method is used in multi-threading programming.

  • It is used to synchronize threads and avoid race conditions.

  • It is used with notify() and notifyAll() methods.

  • wait() method releases the lock on the object it is called on.

  • It can be used with a timeout parameter to avoid indefinite waiting.

Add your answer

Q3. Differentiate between process and thread?

Ans.

Process is an instance of a program while thread is a subset of a process.

  • Process is a program in execution while thread is a subset of a process that can execute independently.

  • Processes have their own memory space while threads share the same memory space.

  • Processes are heavyweight while threads are lightweight.

  • Examples of processes are web browsers, word processors, etc. while examples of threads are spell checkers, print spoolers, etc.

Add your answer

Q4. What is array and do while and while

Ans.

Arrays are a collection of similar data types. While and do-while are loops used for repetitive execution of code.

  • Arrays can be one-dimensional or multi-dimensional

  • While loop executes code as long as the condition is true

  • Do-while loop executes code at least once before checking the condition

  • Example: int[] arr = {1, 2, 3}; while(i < arr.length) {System.out.println(arr[i]); i++;}

  • Example: int i = 0; do {System.out.println(i); i++;} while(i < 5);

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

Q5. What is multithreading?

Ans.

Multithreading is the ability of a CPU to execute multiple threads concurrently.

  • Multithreading improves performance by utilizing idle CPU time.

  • Threads share the same memory space, allowing for efficient communication.

  • Examples include web servers handling multiple requests and video games rendering graphics while processing user input.

Add your answer

Q6. What is overriding ?

Ans.

Overriding is a feature in object-oriented programming where a subclass provides its own implementation of a method that is already defined in its superclass.

  • Overriding allows a subclass to provide a specific implementation of a method that is already defined in its superclass.

  • The method signature (name, parameters, and return type) must be the same in both the superclass and subclass.

  • The subclass method must have the same or a more accessible access modifier than the supercl...read more

View 1 answer

Q7. What is overloading?

Ans.

Overloading is the ability to have multiple methods with the same name but different parameters.

  • Overloading allows for more flexibility in method naming and usage.

  • The compiler determines which method to use based on the number and types of arguments passed.

  • Example: int add(int a, int b) and double add(double a, double b) are both valid overloads of the add method.

  • Overloading can occur within a single class or across multiple classes in an inheritance hierarchy.

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 Associate Software Engineer Interview Questions from Similar Companies

3.8
 • 60 Interview Questions
4.0
 • 15 Interview Questions
4.3
 • 14 Interview Questions
3.8
 • 13 Interview Questions
3.7
 • 11 Interview Questions
3.7
 • 11 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