Samual Sam has Published 2492 Articles

IntBuffer as ReadOnlyBuffer() method in Java

Samual Sam

Samual Sam

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

41 Views

A read-only int buffer can be created using the contents of a buffer with the method asReadOnlyBuffer() in the class java.nio.IntBuffer. The new buffer cannot have any modifications as it is a read-only buffer. However, the capacity, positions, limits etc. of the new buffer are the same as the previous ... Read More

How to pass a date variable in sql query in a JSP?

Samual Sam

Samual Sam

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

909 Views

The tag is used as a nested action for the and the tag to supply a date and time value for a value placeholder. If a null value is provided, the value is set to SQL NULL for the placeholder.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueValue ... Read More

How to fill multiple copies of specified Object to a List in Java

Samual Sam

Samual Sam

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

655 Views

To fill multiple copies of specified object to a list means let’s say you have an element 100 and want to display it 10 times. For this, let us see an example.The following is our list and iterator. We have used nCopiec Collections method to set the elements and how ... Read More

SecureRandom generateSeed() method in Java

Samual Sam

Samual Sam

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

109 Views

The number of seed bytes can be obtained using the method generateSeed() in class java.security.SecureRandom. This method requires a single parameter i.e. the number of seed bytes and it returns the seed bytes that are generated.A program that demonstrates this is given as follows −Example Live Demoimport java.security.*; import java.util.*; public ... Read More

Java Program to sort a List in case insensitive order

Samual Sam

Samual Sam

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

2K+ Views

Let’s say your list is having the following elements −P, W, g, K, H, t, ETherefore, case sensitive order means, capital and small letters will be considered irrespective of case. The output would be −E, g, H, K, P, t, WThe following is our array −String[] arr = new String[] ... Read More

MySQL If statement with multiple conditions?

Samual Sam

Samual Sam

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

6K+ Views

You can use if statement in a stored procedure with multiple conditions with the help of AND or OR operator. The syntax is as follows −DECLARE X int; DECLARE Y int; SET X = value1; SET Y = value2; IF ( (X < Y AND X > value1 AND Y ... Read More

IntBuffer duplicate() method in Java

Samual Sam

Samual Sam

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

83 Views

A duplicate buffer of a buffer can be created using the method duplicate() in the class java.nio.IntBuffer. This duplicate buffer is identical to the original buffer. The method duplicate() returns the duplicate buffer that was created.A program that demonstrates this is given as follows −Example Live Demoimport java.nio.*; import java.util.*; public ... Read More

Is there any JSTL library to parse XML in a JSP?

Samual Sam

Samual Sam

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

150 Views

The JSTL XML tags provide a JSP-centric way of creating and manipulating the XML documents. Following is the syntax to include the JSTL XML library in your JSP.The JSTL XML tag library has custom tags for interacting with the XML data. This includes parsing the XML, transforming the XML data, ... Read More

What is the size of a pointer in C/C++?

Samual Sam

Samual Sam

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

8K+ Views

The size of a pointer in C/C++ is not fixed. It depends upon different issues like Operating system, CPU architecture etc. Usually it depends upon the word size of underlying processor for example for a 32 bit computer the pointer size can be 4 bytes for a 64 bit computer ... Read More

SecureRandom getProvider() method in Java

Samual Sam

Samual Sam

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

62 Views

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

Advertisements