Chandu yadav has Published 1091 Articles

What is Rule of Five in C++11?

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 05:50:29

707 Views

The rule of five is applied in C++ for resource management. Resource management frees the client from having to worry about the lifetime of the managed object, potentially eliminating memory leaks and other problems in the C++ code. But this management comes at a cost. The Rule of The Big ... Read More

Select elements whose attribute value contains a specified value with CSS

Chandu yadav

Chandu yadav

Updated on 24-Jun-2020 05:49:32

192 Views

To select elements whose attribute value contains a specified value, use the [attribute*=”value”] selector.You can try to run the following code to implement the CSS [attribute*="value"] selector,ExampleLive Demo                    [alt* = "tut"] {             border: 5px solid orange;             border-radius: 5px;          }                              

How to specify the perspective on how 3D elements are viewed

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 16:08:25

81 Views

Use the CSS perspective property to specify the perspective on how 3D elements are viewed.You can try to run the following code to achieve thisExampleLive Demo                    .demo1 {             position: relative;       ... Read More

Add a blur effect to the shadow with CSS

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:47:46

1K+ Views

To add a blur effect to the shadow, use the box-shadow property.You can try to run the following code to add blur effectExampleLive Demo                    h2 {             box-shadow: 10px 10px 7px green;             height: 50px;             background-color: yellow;          }                     Heading Two       Above heading has shadow.    

volatile Keyword in Java

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:30:10

5K+ Views

The volatile modifier is used to let the JVM know that a thread accessing the variable must always merge its own private copy of the variable with the master copy in the memory.Accessing a volatile variable synchronizes all the cached copied of the variables in the main memory. Volatile can ... Read More

Jagged Array in Java

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:28:13

4K+ Views

Jagged array is a multidimensional array where member arrays are of different size. For example, we can create a 2D array where first array is of 3 elements, and is of 4 elements. Following is the example demonstrating the concept of jagged array.Example Live Demopublic class Tester {    public static ... Read More

Set Bordered Form Inputs with CSS

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:27:59

154 Views

To set border to form inputs, use the CSS border property.You can try to run the following code to add borderExampleLive Demo                    input[type = text] {             width: 100%;             padding: 10px 15px;             margin: 5px 0;             box-sizing: border-box;             border: 3px inset orange;          }                     Fill the below form,                Subject                    Student                    

Java 8 Optional Class

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:24:33

509 Views

Optional is a container object used to contain not-null objects. Optional object is used to represent null with absent value. This class has various utility methods to facilitate code to handle values as 'available' or 'not available' instead of checking null values. It is introduced in Java 8 and is ... Read More

instanceof operator vs isInstance method in java

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:18:19

436 Views

isInstance method is equivalent to instanceof operator. The method is used in case of objects are created at runtime using reflection. General practice says if type is to be checked at runtime then use isInstance method otherwise instanceof operator can be used. See the example below −Example Live Demopublic class Tester{ ... Read More

Implement Runnable vs Extend Thread in Java

Chandu yadav

Chandu yadav

Updated on 23-Jun-2020 15:04:27

1K+ Views

We can create Thread by either by implementing a runnable interface or by extending Thread class. Below are the detailed steps of using both ways to create Thread.Create a Thread by Implementing a Runnable InterfaceIf your class is intended to be executed as a thread then you can achieve this ... Read More

Advertisements