Jio
10+ J.v.m Public School Interview Questions and Answers
Q1. Why is multiple inheritance not allowed in java
Multiple inheritance is not allowed in Java to avoid the diamond problem.
Java supports multiple interface inheritance to achieve the same functionality.
Diamond problem occurs when a class inherits from two classes with a common method.
Java prioritizes single inheritance to maintain simplicity and avoid ambiguity.
Q2. We need to generate a random number between 15-25, write a code for the following
Code to generate a random number between 15-25
Use Math.random() to generate a random number between 0-1
Multiply the result with the range (25-15) and add the minimum value (15)
Use Math.floor() to round down the result to an integer
Q3. Oops concepts, explain with real time example
Oops concepts are fundamental to object-oriented programming. They help in creating modular and reusable code.
Encapsulation - hiding implementation details of an object from the outside world
Inheritance - creating new classes from existing ones, inheriting their properties and methods
Polymorphism - ability of objects to take on many forms, depending on the context
Abstraction - focusing on essential features of an object, ignoring the rest
Q4. What are java collections
Java collections are classes and interfaces that provide a way to store and manipulate groups of objects.
Java collections include List, Set, Map, Queue, and their respective implementations
They provide methods for adding, removing, and accessing elements
Examples include ArrayList, HashSet, TreeMap, and PriorityQueue
Q5. Difference between arrays and arraylist
Arrays are fixed in size while ArrayLists can dynamically grow and shrink.
Arrays are of fixed size while ArrayLists can be resized dynamically.
Arrays can hold primitive data types and objects while ArrayLists can only hold objects.
Arrays are faster for accessing elements while ArrayLists are faster for adding and removing elements.
Arrays use square brackets [] to declare while ArrayLists use angle brackets <>.
Example: String[] names = new String[5]; ArrayList
namesList = new ...read more
Q6. What was dsa and why more is important
DSA stands for Data Structures and Algorithms, essential concepts in computer science for efficient problem-solving.
DSA involves organizing and storing data in a way that allows for efficient retrieval and manipulation.
Algorithms are step-by-step procedures for solving problems, often involving data structures.
Understanding DSA is crucial for writing efficient code and solving complex problems in software development.
Examples of data structures include arrays, linked lists, t...read more
Q7. What is time theta
Time theta is a measure of the worst-case time complexity of an algorithm.
It is used to analyze the performance of algorithms.
It represents the maximum amount of time an algorithm takes to complete.
It is denoted by the symbol Θ(n).
Q8. Explain bubble sorting
Bubble sorting is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Bubble sort is a comparison-based algorithm
It works by comparing each pair of adjacent elements and swapping them if they are in the wrong order
The algorithm repeats this process until no more swaps are needed
It has a worst-case and average-case complexity of O(n^2)
Example: [5, 3, 8, 4, 2] -> [3, 5, 4, 2, 8] -> [3, 4, 2,...read more
Q9. Explain working of elevator system
Elevator system moves people or goods between floors in a building using a motorized platform.
Elevator car is connected to a system of cables and pulleys controlled by a motor.
Users select desired floor using buttons inside the elevator or outside on each floor.
Elevator system uses sensors to detect when doors can open or close safely.
Emergency brakes engage if there is a malfunction or power outage.
Modern elevators may use computerized systems for efficient operation.
Example...read more
Q10. Solve pattern for brackets
Solve pattern for brackets
Create a function to generate all valid combinations of brackets
Use recursion to generate all possible combinations
Ensure that the brackets are balanced in each combination
More about working at Jio
Interview Process at J.v.m Public School
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month