AmitDiwan has Published 11365 Articles

Java Signature initSign() method with Examples

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:40:30

292 Views

The initSign() method initialize this object for signing. If this method is called again with a different argument, it negates the effect of this call.Let us now see an example −Exampleimport java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.Signature; import java.util.Scanner; public class Main {    public static void main(String args[]) ... Read More

Java Signature getProvider() method with Examples

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:38:17

102 Views

The provider for the signature object can be obtained using the method getProvider() in the class java.security.Signature.Let us now see an example −Exampleimport java.security.*; import java.util.*; public class Main {    public static void main(String[] argv) {       try {          Signature signature = Signature.getInstance("SHA256withRSA"); ... Read More

The abstract keyword in Java

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:35:35

232 Views

A class which contains the abstract keyword in its declaration is known as abstract class. Abstract classes may or may not contain abstract methods, i.e., methods without body. But, if a class has at least one abstract method, then the class must be declared abstract.If a class is declared abstract, it cannot be instantiated. To ... Read More

Traverse through a HashSet in Java

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:33:48

610 Views

HashSet extends AbstractSet and implements the Set interface. It creates a collection that uses a hash table for storage.A hash table stores information by using a mechanism called hashing. In hashing, the informational content of a key is used to determine a unique value, called its hash code.To traverse through a ... Read More

Java Signature getInstance() method with Examples

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:31:24

434 Views

A signature object that can implement the required signature algorithm can be obtained using the method getInstance() in the class java.security.Signature.Let us now see an example −Exampleimport java.security.*; import java.util.*; public class Main {    public static void main(String[] argv) {       try {         ... Read More

Java Signature getAlgorithm() method with Examples

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:29:24

107 Views

The name of the algorithm for the signature object can be obtained using the method getAlgorithm() in the class java.security.Signature.Let us now see an example −Exampleimport java.security.*; import java.util.*; public class Main {    public static void main(String[] argv) {       try {          Signature ... Read More

Log functions in Java

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:27:32

273 Views

The log functions in Java are part of java.lang.Math. The functions include log, log10, log1p. Let us see an example of each of these log functions −static double log(double a)The java.lang.Math.log(double a) returns the natural logarithm (base e) of a double value. Let us see an example −Exampleimport java.io.*; public ... Read More

Trigonometric Functions in Java

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 12:23:14

2K+ Views

The java.lang.Math class contains methods for trigonometric operations like cos(), sin(), tan(), tanh(), cosh(), atan(), etc.Let us work around some of these trigonometric functions in Java −static double asin(double a)The java.lang.Math.asin(double a) returns the arc sine of an angle, in the range of -pi/2 through pi/2.Let us now see an ... Read More

HTML DOM Style objectFit Property

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 11:56:33

54 Views

The HTML DOM Style objectFit property returns and modify how an image or video element in an HTML document should be resized to fit its container element.SyntaxFollowing is the syntax −1. Returning objectFitobject.objectFit2. Modifying objectFitobject.objectFit = “value”Here, value can be −ValueExplanationinitialIt set this property value to its default value.inheritIt inherits ... Read More

HTML DOM Style tabSize Property

AmitDiwan

AmitDiwan

Updated on 23-Sep-2019 11:38:40

42 Views

The HTML DOM Style tabSize property returns and modify the length of the space used for the tab character in an HTML document.SyntaxFollowing is the syntax −1. Returning tabSizeobject.tabSize2. Modifying tabSizeobject.tabSize = “value”Here value can be −ValueExplanationinitialIt set this property value to its default value.inheritIt inherits this property value from ... Read More

Advertisements