Math.clz32 Function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:23:40

116 Views

The clz32() function of the Math object returns the number of zero bits in the starting of the 32-bit binary representation of a number.SyntaxIts Syntax is as followsMath.clz32(31)Example Live Demo    JavaScript Example           var result = Math.clz32(31);       document.write("Result: "+result);     OutputResult: 27

Call Private Constructor in Java

Anvi Jain
Updated on 25-Jun-2020 12:23:27

1K+ Views

The method java.lang.Class.getDeclaredConstructor() can be used to obtain the constructor object for the private constructor of the class. The parameter for this method is a Class object array that contains the formal parameter types of the constructor.A program that demonstrates this is given as follows −Example Live Demopackage Test; import java.lang.reflect.*; public class Demo {    String str;    Double d;    public Demo(String str, Double d) {       this.str = str;       this.d = d;    }    public static void main(String[] args) {       try {          Demo obj = ... Read More

Math.expm1 Function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:22:53

86 Views

This function of the Math object returns the value of ex – 1, where x and e are the base and exponents of natural algorithms.SyntaxIts Syntax is as followsMath.expm1(6);Example Live Demo    JavaScript Example           var result = Math.expm1(6);       document.write("Result: "+result);     OutputResult: 402.4287934927351

Get All Declared Fields from a Class in Java

Krantik Chavan
Updated on 25-Jun-2020 12:22:18

4K+ Views

An array of field objects is returned by the method java.lang.Class.getDeclaredFields(). These field objects include the objects with the public, private, protected and default access but not the inherited fields.Also, the getDeclaredFields() method returns a zero length array if the class or interface has no declared fields or if a primitive type, array class or void is represented in the Class object.A program that demonstrates this is given as follows −Example Live Demopackage Test; import java.lang.reflect.*; public class Demo {    int i;    char c;    public Demo(int i, char c) {       this.i = i;     ... Read More

Fade-In-Up Big Animation Effect with CSS

Samual Sam
Updated on 25-Jun-2020 12:21:08

251 Views

To implement Fade In Up Big Animation Effect on an image with CSS, you can try to run the following code:ExampleLive Demo                    .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 fadeInUpBig {             0% {             opacity: 0;             -webkit-transform: translateY(2000px);          }          100% {             opacity: 1;             -webkit-transform: translateY(0);          }       }       @keyframes fadeInUpBig {          0% {             opacity: 0;             transform: translateY(2000px);          }          100% {             opacity: 1;             transform: translateY(0);          }       }       .fadeInUpBig {          -webkit-animation-name: fadeInUpBig;          animation-name: fadeInUpBig;       }                         Reload page                function myFunction() {             location.reload();          }          

Get the List of All Declared Fields in Java

Smita Kapse
Updated on 25-Jun-2020 12:21:02

8K+ Views

The list of all declared fields can be obtained using the java.lang.Class.getDeclaredFields() method as it returns an array of field objects. These field objects include the objects with the public, private, protected and default access but not the inherited fields.Also, the getDeclaredFields() method returns a zero length array if the class or interface has no declared fields or if a primitive type, array class or void is represented in the Class object.A program that demonstrates this is given as follows −Example Live Demoimport java.lang.reflect.*; public class Demo {    public static void main(String[] argv) throws Exception {       Class ... Read More

CSS cue-after Property

karthikeya Boyini
Updated on 25-Jun-2020 12:20:39

83 Views

The cue-after property specifies a sound to be played after speaking an element's content to delimit it from other. The possible values include −url − The URL of a sound file to be played.none − Nothing has to be played.Example    

Sort Byte Array in Java

Chandu yadav
Updated on 25-Jun-2020 12:20:19

364 Views

A byte array can be sorted using the java.util.Arrays.sort() method with a single argument required i.e. the array to be sorted. A program that demonstrates this is given as follows −Example Live Demoimport java.util.Arrays; public class Demo {    public static void main(String[] args) {       byte[] arr = new byte[] { 4, 1, 9, 7, 5};       System.out.print("The original byte array is: ");       for (byte i: arr) {          System.out.print(i + " ");       }       Arrays.sort(arr);       System.out.print("The sorted byte array is: "); ... Read More

Smith Numbers in Java

Chandu yadav
Updated on 25-Jun-2020 12:19:59

1K+ Views

A composite number whose sum of digits equal to the sum of the digits of its prime factors.Ex: 58 = 2 x 29 (5 + 8 = 12) (2+ 2 + 9 = 12)Programpublic class SmithNumbers {    public static boolean isPrime(int number) {       int loop;       int prime = 1;       for(loop = 2; loop < number; loop++) {          if((number % loop) == 0) {             prime = 0;          }       }       if (prime ... Read More

Sort Array in Case-Sensitive Order in Java

Arjun Thakur
Updated on 25-Jun-2020 12:19:25

426 Views

An array can be sorted in case-sensitive order using the java.util.Arrays.sort() method. Only a single argument required in this case for this method i.e. the array to be sorted. A program that demonstrates this is given as follows −Example Live Demoimport java.util.Arrays; public class Demo {    public static void main(String args[]) {       String[] arr = new String[] { "apple", "mango", "Banana", "Melon", "orange" };       System.out.print("The unsorted array is: ");       System.out.println(Arrays.toString(arr));       Arrays.sort(arr);       System.out.print("The sorted array in case-sensitive order is: ");       System.out.println(Arrays.toString(arr));    } ... Read More

Advertisements