Nishtha Thakur has Published 498 Articles

How to prevent class inheritance in C++

Nishtha Thakur

Nishtha Thakur

Updated on 11-Dec-2024 09:52:41

2K+ Views

Here we will see how to prevent inheritance in C++. The concept of preventing inheritance is known as the final class. In Java or C#, we can use final classes. In C++ there are no such direct ways. Here we will see how to simulate the final class in C++. ... Read More

Private Destructor in C++

Nishtha Thakur

Nishtha Thakur

Updated on 19-Nov-2024 18:21:52

993 Views

In C++, a private destructor is a destructor that is declared within a private access specifier, which means that the destructor cannot be accessed or called directly outside the class, which is useful for design patterns where the user wants to control how and when an object will destroy. Syntax ... Read More

Java program to create three vertical columns with equal number of buttons in GridLayout

Nishtha Thakur

Nishtha Thakur

Updated on 18-Nov-2024 22:29:08

362 Views

In this article, we will learn how to create a Java program that arranges buttons in three vertical columns with an equal number of buttons using GridLayout. The GridLayout class allows us to arrange components in a grid format, which makes it ideal for creating a uniform layout of buttons. ... Read More

How to set preferred size for BoxLayout Manager in Java?

Nishtha Thakur

Nishtha Thakur

Updated on 29-Oct-2024 00:37:55

2K+ Views

In this article, we will learn to set the preferred size for a panel within a JFrame using the BoxLayout manager in Java Swing. By setting the preferred and maximum size for the panel, we can control the layout’s appearance, ensuring that the panel maintains a consistent size as other ... Read More

Java program to change the background color of rows in a JTable

Nishtha Thakur

Nishtha Thakur

Updated on 23-Sep-2024 19:08:45

1K+ Views

In this program, we will create a JTable and change the background color of its rows. A JTable is used to display data in a tabular format, and by adjusting its properties, we can modify its appearance. The goal of this program is to set a custom background color for ... Read More

High-level Data Link Control (HDLC)

Nishtha Thakur

Nishtha Thakur

Updated on 31-Oct-2023 04:57:51

158K+ Views

High-level Data Link Control (HDLC) is a group of communication protocols of the data link layer for transmitting data between network points or nodes. Since it is a data link protocol, data is organized into frames. A frame is transmitted via the network to the destination that verifies its successful ... Read More

Uninitialized primitive data types in C/C++

Nishtha Thakur

Nishtha Thakur

Updated on 27-Aug-2020 13:56:42

307 Views

One of the most frequent question is what will be the value of some uninitialized primitive data values in C or C++? Well the answer will be different in different systems. We can assume the compiler will assign 0 into the variables. It can be done for integer as 0, ... Read More

Use CSS max-width property responsive for video player

Nishtha Thakur

Nishtha Thakur

Updated on 04-Jul-2020 06:18:01

571 Views

You can try to run the following code to use a max-width property to make your video player responsive −ExampleLive Demo                          video {             max-width: 100%;             height: auto;          }                                                     To check the effect, you need to resize the browser.    

How to make an Android status bar notification persist across phone reboot?

Nishtha Thakur

Nishtha Thakur

Updated on 03-Jul-2020 11:54:06

522 Views

This example demonstrate about How to make an Android status bar notification persist across phone rebootStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml. Step ... Read More

CSS grid-template-columns property

Nishtha Thakur

Nishtha Thakur

Updated on 03-Jul-2020 08:05:30

83 Views

The grid-template-columns property is used to set the number of columns in the Grid.ExampleYou can try to run the following code to implement the grid-template-columns property −Live Demo                    .container {             display: grid;   ... Read More

1 2 3 4 5 ... 50 Next
Advertisements