Nishtha Thakur has Published 387 Articles
Nishtha Thakur
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
Nishtha Thakur
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
Nishtha Thakur
362 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
Nishtha Thakur
595 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
Nishtha Thakur
84 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
Nishtha Thakur
268 Views
Use the flex-wrap property with nowrap value to avoid flex-items to wrap.ExampleYou can try to run the following code to implement the nowrap value −Live Demo .mycontainer { display: flex; ... Read More
Nishtha Thakur
103 Views
Use the animation-duration property to set how long an animation should take to complete one cycleExampleYou can try to run the following code to implement the animation-duration property −Live Demo div { width: ... Read More
Nishtha Thakur
5K+ Views
Before getting into an example, we should know what thread is. A thread is a lightweight sub-process, it going to do background operations without interrupt to ui. This example demonstrate about How to use thread.sleep() in android.Step 1 − Create a new project in Android Studio, go to File ⇒ ... Read More
Nishtha Thakur
1K+ Views
Java provides supporting classes/datatypes to store all the MySQL datatypes, following is the table which list outs the respective java types for MySQL datatypes −MySQL TypeJava TypeCHARStringVARCHARStringLONGVARCHARStringNUMERICjava.math.BigDecimalDECIMALjava.math.BigDecimalBITbooleanTINYINTbyteSMALLINTshortINTEGERintBIGINTlongREALfloatFLOATdoubleDOUBLEdoubleBINARYbyte []VARBINARYbyte []LONGVARBINARYbyte []DATEjava.sql.DateTIMEjava.sql.TimeTIMESTAMPjava.sql.TiimestampExampleFollowing JDBC program creates a table with name sample with all the possible datatypes in MySQL −import java.sql.Connection; import java.sql.DriverManager; import ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP