Articles on Trending Technologies

Technical articles with clear explanations and examples

Java Program to Check if a String is Numeric

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

ExampleYou can check if a given string is Numeric as shown in the following program.import java.util.Scanner; public class StringNumeric {    public static void main(String[] args) {       Scanner sc = new Scanner(System.in);       System.out.println("Enter a string ::");       String str = sc.next();       boolean number = str.matches("-?\d+(\.\d+)?");       if(number) {          System.out.println("Given string is a number");       } else {          System.out.println("Given string is not a number");       }    } }OutputEnter a string :: 4245 Given string is a number

Read More

Java Program to Convert a Stack Trace to a String

karthikeya Boyini
karthikeya Boyini
Updated on 11-Mar-2026 338 Views

The Java.io.StringWriter class is a character stream that collects its output in a string buffer, which can then be used to construct a string. Closing a StringWriter has no effect.The Java.io.PrintWriter class prints formatted representations of objects to a text-output stream.Using these two classes you can convert a Stack Trace to a String.Exampleimport java.io.PrintWriter; import java.io.StringWriter; public class StackTraceToString {    public static void main(String args[]) {       try {          int a[] = new int[2];          System.out.println("Access element three :" + a[3]);       } catch (ArrayIndexOutOfBoundsException e) { ...

Read More

Usage of CSS :first-line pseudo-element

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

Use this element to add special styles to the first line of the text in a selector. The following example demonstrates how to use the :first-line element to add special effects to the first line of elements in the document.Example                    p:first-line {             text-decoration: underline;          }          p.noline:first-line {             text-decoration: none;          }                     This line would not ...

Read More

Which element is used to add special style to the first letter of the text in a selector with CSS

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

Use the :first-letter element to add special effects to the first letter of elements in the document. You can try to run the following code to add special styles to the first letter of text −Example                    p:first-letter {             font-size: 5em;          }          p.normal:first-letter {             font-size: 10px;          }                     First character of this paragraph will be normal ...

Read More

Fade Out Left Animation Effect with CSS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 11-Mar-2026 182 Views

To implement Fade Out Left Animation Effect on an image 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: 10s;             animation-duration: 10s;             -webkit-animation-fill-mode: both;             animation-fill-mode: both;          }          @-webkit-keyframes fadeOutLeft {             0% {                opacity: 1;                -webkit-transform: translateX(0);             }             100% {                opacity: 0;                -webkit-transform: translateX(-20px);             }          }          @keyframes fadeOutLeft {             0% {                opacity: 1;                transform: translateX(0);             }             100% {                opacity: 0;                transform: translateX(-20px);             }          }          .fadeOutLeft {             -webkit-animation-name: fadeOutLeft;             animation-name: fadeOutLeft;          }                           Reload page                function myFunction() {             location.reload();          }          

Read More

Usage of CSS !important rule

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

The !important rule provides a way to make your CSS cascade. It also includes the rules that are to be applied always. A rule having a !important property will always be applied, no matter where that rule appears in the CSS document.For example, in the following style sheet, the paragraph text will be black, even though the first style property applied is red −     If you want to make sure that a property always applied, you would add the !important property to the tag. Therefore, to make the paragraph text always red, you should write it as follows ...

Read More

Disable text wrapping inside an element using CSS

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

To disable text wrapping inside an element, use the white-space property. You can try to run the following code to implement the white-space propertyExample                    p {             white-space: nowrap;          }                              This is demo text. This is demo text.          This is demo text. This is demo text.          This is demo text. This is demo text.          This is some text. This is demo text.          

Read More

How to create a two dimensional array in JavaScript?

Nikitha N
Nikitha N
Updated on 11-Mar-2026 782 Views

A two-dimensional array has more than one dimension, such as myarray[0][0] for element one, myarray[0][1] for element two, etc. To create a two-dimensional array in JavaScript, you can try to run the following code −Example                                        var myarray=new Array(3);                  for (i=0; i

Read More

Make any particular color transparent with CSS Filters

Ankith Reddy
Ankith Reddy
Updated on 11-Mar-2026 1K+ Views

To make any particular color transparent, use Chroma Filter. You can use it with scrollbars also.The following parameter can be used in this filterParameterDescriptionColorThe color that you'd like to be transparent.Implementing the CSS Chroma Filter −                         Text Example:       CSS Tutorials    

Read More

Fade Out Down Animation Effect with CSS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 11-Mar-2026 184 Views

To implement Fade Out Down Animation Effect on an image 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: 10s;             animation-duration: 10s;             -webkit-animation-fill-mode: both;             animation-fill-mode: both;          }          @-webkit-keyframes fadeOutDown {             0% {                opacity: 1;                -webkit-transform: translateY(0);             }             100% {                opacity: 0;                -webkit-transform: translateY(20px);             }          }          @keyframes fadeOutDown {             0% {                opacity: 1;                transform: translateY(0);             }             100% {                opacity: 0;                transform: translateY(20px);             }          }          .fadeOutDown {             -webkit-animation-name: fadeOutDown;             animation-name: fadeOutDown;          }                           Reload page                function myFunction() {             location.reload();          }          

Read More
Showing 1–10 of 61,248 articles
« Prev 1 2 3 4 5 6125 Next »
Advertisements