Karthikeya Boyini has Published 2192 Articles

IntBuffer arrayOffset() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

110 Views

The offset of the first element of the buffer inside the buffer array is obtained using the method arrayOffset() in the class java.nio.IntBuffer. If the buffer backed by the array is read-only, then the ReadOnlyBufferException is thrown.A program that demonstrates this is given as follows −Example Live Demoimport java.nio.*; import java.util.*; ... Read More

KeyPairGenerator getProvider() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

105 Views

The provider of the key pair object can be obtained using the getProvider() method in the class java.security.KeyPairGenerator. This method requires no parameters and it returns the provider of the key pair object.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; import java.util.*; public class Demo { ... Read More

LocalTime range() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

155 Views

The range of values for a ChronoField can be obtained using the range() method in the LocalTime class in Java. This method requires a single parameter i.e. the ChronoField for which the range of values is required and it returns the range of values.A program that demonstrates this is given ... Read More

What does a “set+0” in a MySQL statement do?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

122 Views

The set+0 converts the set value to integer. Let us see an example by creating a table −mysql> create table SetZeroDemo    -> (    -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> TechnicalSkills set('C', 'Spring Framework /Hibernate', 'Python', 'Django Framework', 'Core Java') NOT NULL    -> ); ... Read More

Please share one example of using taglib directive in JSP

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

112 Views

The JavaServer Pages API allow you to define custom JSP tags that look like HTML or XML tags and a tag library is a set of user-defined tags that implement custom behavior.The taglib directive declares that your JSP page uses a set of custom tags, identifies the location of the ... Read More

How to check whether an input string contains a specified substring ignoring the case using JSP?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

419 Views

The fn:containsIgnoreCase() function determines whether an input string contains a specified substring. While doing search it ignores the case.SyntaxThe fn:containsIgnoreCase() function has the following syntax −boolean containsIgnoreCase(java.lang.String, java.lang.String)ExampleFollowing is the example to explain the functionality of the fn:containsIgnoreCase() function −           Using JSTL Functions ... Read More

Duration minus() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

269 Views

An immutable copy of a duration where the required duration is subtracted from it can be obtained using the minus() method in the Duration class in Java. This method requires two parameters i.e. the duration to be subtracted and the TemporalUnit of the duration. Also, it returns the duration with ... Read More

FloatBuffer compareTo() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

165 Views

A buffer can be compared with another buffer using the method compareTo() in the class java.nio.FloatBuffer. This method returns a negative integer if the buffer is less than the given buffer, zero if the buffer is equal to the given buffer and a positive integer if the buffer is greater ... Read More

Duration dividedBy() method in Java

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

100 Views

An immutable copy of a duration where the required duration is divided by a value can be obtained using the method dividedBy() in the Duration class in Java. This method requires a single parameter i.e. the value which is to be divided and it returns the immutable copy of the ... Read More

How can I create custom tag in JSP which can accept attribute from parent jsp page?

karthikeya Boyini

karthikeya Boyini

Updated on 30-Jul-2019 22:30:25

238 Views

You can use various attributes along with your custom tags. To accept an attribute value, a custom tag class needs to implement the setter methods, identical to the JavaBean setter methods as shown below −package com.tutorialspoint; import javax.servlet.jsp.tagext.*; import javax.servlet.jsp.*; import java.io.*; public class HelloTag extends SimpleTagSupport { ... Read More

Advertisements