Virtusa Consulting Services
30+ Sri Krishna Group Interview Questions and Answers
Reverse a given stack of integers using recursion.
Note:
You are not allowed to use any extra space other than the internal stack space used due to recursion. You are not allowed to...read more
You are given a string S of words. Your task is to count the occurrence of each word present in the string S. A word is a sequence of one or more non-space characters, and there can be mu...read more
You are given a positive number ‘N.’ You need to find all the numbers such that the sum of digits of those numbers to the number itself is equal to ‘N.’
For example:
You are given ‘N’ as 21, th...read more
Basic concepts of java.
What is Constructor,
what is Oops concept,
What is exceptional handling,
What is multithreading,
how to reverse a linkedlist,
What was your college project,
What is di...read more
What are the three levels of data abstraction?
What is the difference between JDK, JRE, and JVM?
What are some of the advantages of HTML5 over its previous versions?
What are the various formatting tags in HTML?
What is Cursor? How to use a Cursor?
What is meant by normalization and denormalization?
Difference between reset vs normalize CSS?. How do they differ?
What is the difference between .call() and .apply()?
How do you compare Object and Map
What is a z-index, how does it function?
What is the difference between let and var
Difference between Abstract class and Interface.
Q18. Is a string mutable/immutable with an example
A string can be both mutable and immutable depending on the programming language.
In languages like Java and Python, strings are immutable.
In languages like C++ and C#, strings are mutable.
Immutable strings cannot be modified once created, while mutable strings can be modified.
Example of immutable string: 'hello world'.replace('o', '0') returns 'hell0 w0rld'.
Example of mutable string: string s = 'hello'; s[0] = 'j'; s now becomes 'jello'.
Q19. String is immutable. Array and arraylist differences
String is immutable, array and arraylist are mutable data structures.
String is immutable, meaning its value cannot be changed once it is created.
Array is a fixed-size data structure that stores elements of the same data type.
ArrayList is a dynamic array that can grow or shrink in size as needed.
Example: String str = "hello"; char[] arr = {'h', 'e', 'l', 'l', 'o'}; ArrayList
list = new ArrayList ();
Q20. What is Java OOP's concept
Java OOP's concept is a programming paradigm that uses objects to design applications and programs.
Java OOP's concept is based on four main principles: encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation is the process of hiding the implementation details of an object from the outside world.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms or behaviors.
Abstraction is the pr...read more
Q21. A program on recursion.
Recursion is a programming technique where a function calls itself to solve a problem.
Recursion involves a base case and a recursive case
Recursion can be used to solve problems like factorial, Fibonacci sequence, and binary search
Recursion can be less efficient than iterative solutions for some problems
Q22. OOPS concept with examples
OOPS is a programming paradigm based on the concept of objects.
OOPS stands for Object-Oriented Programming System
It focuses on creating objects that contain both data and functions
Encapsulation, Inheritance, and Polymorphism are the three main pillars of OOPS
Example: A car is an object that has properties like color, model, and functions like start, stop, and accelerate
Q23. Explain Marker Interface.
Marker interface is an empty interface used to mark classes for special treatment.
Marker interface has no methods or fields.
It is used to provide metadata to the JVM or other tools.
Examples include Serializable interface in Java.
Q24. Explain OOPs concepts.
OOPs concepts are the principles of Object-Oriented Programming, including encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data into a single unit (object).
Inheritance: Allowing a class to inherit properties and behavior from another class.
Polymorphism: The ability for objects of different classes to respond to the same method call.
Abstraction: Hiding the complex implementation details and showing only the...read more
Q25. Explain synchronization.
Synchronization is the coordination of multiple processes or threads to ensure they access shared resources in a controlled manner.
Synchronization is important in multi-threaded programming to prevent race conditions and ensure data consistency.
Common synchronization mechanisms include locks, semaphores, and monitors.
For example, using a mutex lock to protect a critical section of code from being accessed by multiple threads simultaneously.
Q26. Explain Normalization.
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization is used to eliminate data redundancy by breaking up tables into smaller, related tables.
It helps in reducing data anomalies such as update, insert, and delete anomalies.
Normalization is achieved through a series of stages called normal forms, such as 1NF, 2NF, 3NF, and BCNF.
For example, in a database of students and courses, instead of storing student de...read more
Q27. Explain Array and ArrayList
Array is a fixed-size collection of elements of the same data type, while ArrayList is a dynamic-size collection of objects.
Array is a static data structure with a fixed size, while ArrayList is a dynamic data structure that can grow or shrink in size.
Arrays can only store elements of the same data type, while ArrayList can store objects of different data types.
Arrays are accessed using index positions, while ArrayList provides methods for adding, removing, and accessing elem...read more
Q28. Deadlock scenario in thread
Deadlock scenario in thread occurs when two or more threads are waiting for each other to release resources, causing a standstill.
Two threads each holding a resource needed by the other thread
No thread can proceed until the other releases the resource
Can be avoided by careful resource allocation and ordering
Q29. Maximum questios from java
The question is asking for the maximum number of questions that can be asked from Java.
Java is a versatile programming language with a wide range of topics that can be covered in questions.
Topics can include data types, control structures, object-oriented programming, exception handling, multithreading, collections, etc.
Examples of questions could be related to inheritance, polymorphism, encapsulation, abstraction, interfaces, etc.
Q30. Multithreading in Java
Multithreading in Java allows multiple threads to execute concurrently, improving performance and responsiveness.
Multithreading is achieved in Java by extending the Thread class or implementing the Runnable interface.
Threads can be started using the start() method and controlled using methods like join(), sleep(), and interrupt().
Synchronization is important to prevent race conditions and ensure thread safety, which can be achieved using synchronized blocks or methods.
Java pr...read more
Q31. Array sort program
Implement a program to sort an array of strings
Use a sorting algorithm like bubble sort, selection sort, or quicksort
Ensure the sorting algorithm is implemented correctly for strings
Consider using built-in sorting functions in programming languages like sort() in Python
More about working at Virtusa Consulting Services
Top HR Questions asked in Sri Krishna Group
Interview Process at Sri Krishna Group
Top Associate Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month