File Organization

Files The file is a collection of records related to each other. The file size is limited by the size of the memory and storage medium. There are two important features of the file: 1. File Activity 2. File Volatility File activity: It specifies that percent of actual records proceed […]

Polymorphism in Java

The word polymorphism means having many forms. This feature of object-oriented programming allows us to perform a single action in different ways.  In other words, polymorphism allows you to define one interface and have many implementations. The word “poly” means many and “morphs” means forms, which means multiple forms. In Java, […]

Program To Implement Queue in Java

A Queue is a linear data structure, following a particular order FIFO (First In First Out) where we can insert elements at one end and remove elements in the other end just like a human queue from the supermarket or railways ticket booking counters. In the previous article, we saw […]

Garbage Collection in Java

Garbage Collection in Java Garbage Collection means and as the name implies freeing up of space by the waste objects or garbage to avoid memory leaks. Since objects are dynamically allocated by using the new keyword how these objects are destroyed and their memory is released for reallocation. Some languages […]

How To Swap Values In C++

C++ Swap Function Swap function is used to interchange two values in variables with each other. For example variable x contains 10 and y contains 20, after swap, x contains 20 and y contains 10. C++ has a inbuild swap function i.e, swap(x,y). Without using this inbuild function we can […]