Articles on Trending Technologies

Technical articles with clear explanations and examples

Can we define an interface inside a Java class?

Sravani S
Sravani S
Updated on 11-Mar-2026 7K+ Views

Yes, you can define an interface inside a class and it is known as a nested interface. You can’t access a nested interface directly; you need to access (implement) the nested interface using the inner class or by using the name of the class holding this nested interface.Examplepublic class Sample {    interface myInterface {       void demo();    }    class Inner implements myInterface {       public void demo() {          System.out.println("Welcome to Tutorialspoint");       }    }    public static void main(String args[]) {       Inner obj = ...

Read More

Does Java support default parameter values for a method?

Sravani S
Sravani S
Updated on 11-Mar-2026 3K+ Views

Java does not support the concept of default parameter however, you can achieve this usingMethod overloadingUsing method overloading if you define method with no arguments along with parametrized methods. Then you can call a method with zero arguments.Variable argumentsIn Java methods parameters accept arguments with three dots. These are known as variable arguments. Once you use variable arguments as a parameter method, while calling you can pass as many number of arguments to this method (variable number of arguments) or, you can simply call this method without passing any arguments.Examplepublic class Sample {    void demoMethod(String... args) {     ...

Read More

Flip Out X Animation Effect with CSS

Samual Sam
Samual Sam
Updated on 11-Mar-2026 163 Views

To implement Flip Out X Animation effect with CSS, you can try to run the following code −Example                    .animated {             background-image: url(/css/images/logo.png);             background-repeat: no-repeat;             background-position: left top;             padding-top:95px;             margin-bottom:60px;             -webkit-animation-duration: 1s;             animation-duration: 1s;             -webkit-animation-fill-mode: both;             animation-fill-mode: both;          }          @-webkit-keyframes flipOutX {             0% {                -webkit-transform: perspective(400px) rotateX(0deg);                opacity: 1;             }             100% {                -webkit-transform: perspective(400px) rotateX(90deg);                opacity: 0;             }          }          @keyframes flipOutX {             0% {                transform: perspective(400px) rotateX(0deg);                opacity: 1;             }             100% {                transform: perspective(400px) rotateX(90deg);                opacity: 0;             }          }          .flipOutX {             -webkit-animation-name: flipOutX;             -webkit-backface-visibility: visible !important;             animation-name: flipOutX;             backface-visibility: visible !important;          }                           Reload page                function myFunction() {             location.reload();          }          

Read More

How to write a Regular Expression in JavaScript to remove spaces?

Anvi Jain
Anvi Jain
Updated on 11-Mar-2026 296 Views

To remove spaces in JavaScript, you can try to run the following regular expression. It removes the spaces from a string −Example                    var str = "Welcome to Tutorialspoint";          document.write(str);                    //Removing Spaces          document.write(""+str.replace(/\s/g, ''));                       Output

Read More

Role of CSS: valid Selector

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 215 Views

Use the CSS : valid selector to style all elements with a valid value .ExampleYou can try to run the following code to implement the :valid Selector                    input:valid {             background: red;             color: white;          }                     Heading             The style (red color background) appears if you type a relevant/ valid email address.    

Read More

Role of CSS :visited Selector

varma
varma
Updated on 11-Mar-2026 243 Views

Use the CSS : visited selector to style all visited links.ExampleYou can try to run the following code to implement the :visited selector:                    a:link, a:visited {             background-color: white;             color: black;             border: 1px solid blue;             padding: 30px 30px;             text-align: center;             text-decoration: none;             display: inline-block;          }          a:hover, a:active {             background-color: red;             color: white;          }                     Demo Link    

Read More

Usage of CSS align-content property space-between value

George John
George John
Updated on 11-Mar-2026 166 Views

Use the align-content property with value space-between to add space between the flex lines.You can try to run the following code to implement the space-between valueExample                    .mycontainer {             display: flex;             height: 200px;             background-color: red;             align-content: space-between;             flex-wrap: wrap;          }          .mycontainer > div {             background-color: yellow;             text-align: center;             line-height: 60px;             font-size: 30px;             width: 100px;             margin: 5px;          }                     Queue                Q1          Q2          Q3          Q4          Q5          Q6          Q7          Q8          

Read More

Wave effect with CSS?

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 2K+ Views

Wave effect is used to give the object a sine wave distortion to make it look wavy.The following parameters can be used in this filter:S.NoParameter & Description1.AddA value of 1 adds the original image to the waved image, 0 does not.2.FreqThe number of waves.3.LightThe strength of the light on the wave (from 0 to 100).4.PhaseAt what degree the sine wave should start (from 0 to 100).5.StrengthThe intensity of the wave effect.ExampleYou can try to run the following code to set wave effect:                         Text Example:       CSS Tutorials    

Read More

Add transparency to the background with CSS

usharani
usharani
Updated on 11-Mar-2026 338 Views

Use the opacity property to add transparency to the background of an element. You can try to run the following code to work.Example                    div {             background-color: #808000;             padding: 20px;          }          div.one {             opacity: 0.2;             filter: alpha(opacity=20);          }          div.two {             opacity: 0.5;             filter: alpha(opacity=50);          }                     Heading       Check transparency in the below section:                opacity 0.2                      opacity 0.5                      opacity 1          

Read More

Execute a script each time the playback rate changes in HTML?

vanithasree
vanithasree
Updated on 11-Mar-2026 169 Views

Use the onratechange attribute to execute a script each time the playback rate changes in HTML in HTML.ExampleYou can try to run the following code to implement onratechange attribute −                                        Your browser does not support the video element.             Change the speed of the video                      function display() {             document.getElementById("test").innerHTML = "Speed: " + document.getElementById("myid").playbackRate;          }          function update(ob) {             document.getElementById("myid").playbackRate = ob.value;          }           Output

Read More
Showing 10701–10710 of 61,248 articles
Advertisements