Nikitha N has Published 89 Articles

Multidimensional array in Java

Nikitha N

Nikitha N

Updated on 07-Mar-2024 16:45:41

858 Views

ExampleFollowing is a simple example of a multi-dimensional array. Live Demopublic class Tester {    public static void main(String[] args) {       int[][] multidimensionalArray = { {1,2},{2,3}, {3,4} };             for(int i = 0 ; i < 3 ; i++){          //row          for(int j = 0 ; j < 2; j++){             System.out.print(multidimensionalArray[i][j] + " ");          }          System.out.println();       }    } }Output1 2 2 3 3 4

Define skew transforms along with x axis using CSS

Nikitha N

Nikitha N

Updated on 29-Jun-2020 11:13:05

118 Views

You can try to run the following code to implement skew transforms along with x-axis using CSS −ExampleLive Demo                    div {             width: 300px;             height: 100px;       ... Read More

Arrange two or more colors in linear formats using CSS3 Gradients

Nikitha N

Nikitha N

Updated on 29-Jun-2020 10:16:13

48 Views

Linear gradients are used to arrange two or more colors in linear formats.ExampleYou can try to run the following code to implement linear gradients in CSS3 −Live Demo                    #grad1 {             height: 100px;             background: -webkit-linear-gradient(pink,green);             background: -o-linear-gradient(pink,green);             background: -moz-linear-gradient(pink,green);             background: linear-gradient(pink,green);          }                               Output

CSS border-image-width

Nikitha N

Nikitha N

Updated on 29-Jun-2020 09:20:58

131 Views

The border-image-width property is used to set the border image width. You can try to run the following code to implement the border-image-width property −ExampleLive Demo                    #borderimg1 {             border: 15px solid transparent;     ... Read More

Is it correct to use JavaScript Array.sort() method for shuffling?

Nikitha N

Nikitha N

Updated on 24-Jun-2020 06:40:54

40 Views

Yes, you can use the JavaScript Array.sort() method for shuffling. Let’s see howExamplefunction shuffleDisplay(arr) {    var tmp, current;        // calculating length    var top = arr.length;    if(top) while(--top) {       current = Math.floor(Math.random() * (top + 1));       tmp = arr[current];       arr[current] = arr[top];       arr[top] = tmp;    }    return arr; }

Difference between private, public, and protected modifiers in C++

Nikitha N

Nikitha N

Updated on 24-Jun-2020 06:33:56

6K+ Views

Data hiding is one of the important features of Object Oriented Programming which allows preventing the functions of a program to access directly the internal representation of a class type. The access restriction to the class members is specified by the labeled access modifiers − public, private, and protected sections ... Read More

What does the explicit keyword mean in C++?

Nikitha N

Nikitha N

Updated on 24-Jun-2020 06:18:59

3K+ Views

The explicit keyword in C++ is used to mark constructors to not implicitly convert types. For example, if you have a class Foo −class Foo { public:     Foo(int n); // allocates n bytes to the Foo object     Foo(const char *p); // initialize object with char *p ... Read More

The Biggest Changes in C++11

Nikitha N

Nikitha N

Updated on 24-Jun-2020 05:56:48

106 Views

C++11 was the modern C++ standard published in 2011. This brought many major extensions and improvements to the existing language. Following are the major changes/additions of C++11 −Initializer listsAutomatic type deductionRvalue references and move constructorsconstexpr – Generalized constant expressionsModification to the definition of plain old dataUniform initializationRange-based for loopLambda functions ... Read More

How to set the page-break behavior after an element with JavaScript?

Nikitha N

Nikitha N

Updated on 23-Jun-2020 12:36:09

556 Views

Use the pageBreakAfter property in JavaScript to set the page-break behavior after an element. Use the always property for page after an element.Note − The changes would be visible while printing or viewing the print preview.ExampleYou can try to run the following code to return the page-break behavior after an element ... Read More

Set how many seconds or milliseconds a transition effect takes to complete.

Nikitha N

Nikitha N

Updated on 23-Jun-2020 11:40:15

98 Views

To set the duration for an effect to complete, use the transitionDuration property in JavaScript.ExampleYou can try to run the following code to return how many seconds or milliseconds a transition effect takes to complete −                    #div1 {   ... Read More

1 2 3 4 5 ... 9 Next
Advertisements