Algorithm - ANS-A sequence of instructions written to solve a specific problem
What is the relation between a string's length and the string's last index? - ANS-In a String
character indexing starts from 0, so the last index will be length-1
Arrays - ANS-An array is a data structure, which can store a fixed-size collection of elements of
the same data type. An array is used to store a collection of data, but it is often more useful to
think of an array as a collection of variables of the same type.
Searching (linear, binary) - ANS-Linear search is a search that finds an element in the list by
searching the element sequentially until the element is found in the list. On the other hand, a
binary search is a search that finds the middle element in the list recursively until the middle
element is matched with a searched element. Working of both the searches
Insertion sort - ANS-simple sorting algorithm that works similar to the way you sort playing cards
in your hands. The array is virtually split into a sorted and an unsorted part. Values from the
unsorted part are picked and placed at the correct position in the sorted part.
Methods - ANS-a way to perform some task. Similarly, the method in Java is a collection of
instructions that performs a specific task. It provides the reusability of code.
Overloading methods - ANS-a way to perform some task. Similarly, the method in Java is a
collection of instructions that performs a specific task. It provides the reusability of code.
Pass by Value - ANS-In the pass by value, we pass the original parameters as an argument
while calling a function. In this case, there will be no change to the original parameters.
Internally the value of the original parameters is copied and stored in the same data type
variable. Any changes are reflected in the copied variables instead of the original ones.
Multidimensional arrays - ANS-An array of arrays. In simple words as array of arrays. Data in
multidimensional arrays are stored in tabular form (in row major order).
object-oriented programming - ANS-Use objects as a primary source to implement what is to
happen in the code. Objects are seen by the viewer or user, performing tasks assigned by you.
Object-oriented programming aims to implement real-world entities like inheritance, hiding,
polymorphism etc. in programming. The main aim of OOP is to bind together the data and the
functions that operate on them so that no other part of the code can access this data except that
function.