Karthikeya Boyini has Published 2383 Articles

Double Pointer (Pointer to Pointer) in C

karthikeya Boyini

karthikeya Boyini

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

10K+ Views

A pointer is used to store the address of variables. So, when we define a pointer to pointer, the first pointer is used to store the address of the second pointer. Thus it is known as double pointers.AlgorithmBegin    Declare v of the integer datatype.       Initialize v ... Read More

Java Program to sort a List in case sensitive order

karthikeya Boyini

karthikeya Boyini

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

589 Views

Let’s say your list is having the following elements −P, W, g, K, H, t, ETherefore, case sensitive order means, at first the sorted order would be in capital letters and then small −E, H, K, P, W, g, tThe following is our array −String[] arr = new String[] { ... Read More

MySQL DateTime Now()+5 days/hours/minutes/seconds?

karthikeya Boyini

karthikeya Boyini

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

454 Views

To update the current date and time to 5 days, you need to use the Now() + 5. That would update the entire date-time i.e. days, hour, minutes and seconds. To understand this, let us create a table. The query to create a table is as follows −mysql> create table ... Read More

Java Program to merge duplicates of a List with TreeSet

karthikeya Boyini

karthikeya Boyini

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

367 Views

Let’s say the following is a List. In this, we have duplicates elements as well −Listls = new ArrayList(); ls.add("A"); ls.add("B"); ls.add("C"); ls.add("D"); ls.add("D"); ls.add("E"); ls.add("F"); ls.add("G"); ls.add("E");Now, create a TreeSet and merge the duplicates of the List −TreeSetset = new TreeSet(); set.addAll(ls);Example Live Demoimport java.util.ArrayList; import java.util.TreeSet; import java.util.List; public ... Read More

IntBuffer compareTo() method in Java

karthikeya Boyini

karthikeya Boyini

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

96 Views

A buffer can be compared with another buffer using the method compareTo() in the class java.nio.IntBuffer. 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

What is isErrorPage attribute in JSP?

karthikeya Boyini

karthikeya Boyini

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

1K+ Views

The errorPage attribute tells the JSP engine which page to display if there is an error while the current page runs. The value of the errorPage attribute is a relative URL.The following directive displays MyErrorPage.jsp when all uncaught exceptions are thrown −The isErrorPage attribute indicates that the current JSP can ... Read More

How to group queries using transaction in a JSP?

karthikeya Boyini

karthikeya Boyini

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

185 Views

The tag is used to group the and tags into transactions. You can put as many and tags as statements inside the tag to create a single transaction.It ensures that the database modifications performed by the nested actions are either committed or rolled back ... Read More

MySQL find/ replace string in fields?

karthikeya Boyini

karthikeya Boyini

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

251 Views

To find/replace string in fields, the syntax is as follows −update yourTableName set yourColumnName =REPLACE(yourColumnName, yourOldValue, yourNewValue);To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table FindReplaceDemo    -> (    -> FileId int NOT NULL AUTO_INCREMENT PRIMARY ... Read More

SecureRandom getAlgorithm() method in Java

karthikeya Boyini

karthikeya Boyini

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

96 Views

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

Java Program to remove an element from List with ListIterator

karthikeya Boyini

karthikeya Boyini

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

206 Views

Let’s say the following is our List with elements −ArrayList < String > arrList = new ArrayList < String > (); arrList.add("Jack"); arrList.add("Tom"); arrList.add("Brad"); arrList.add("Amy"); arrList.add("Ben"); arrList.add("Peter"); arrList.add("Katie"); arrList.add("Tim");Now, use the listIterator(). The next() method returns the next element in the List. Hoverer, remove an element using remove() method −ListIteratoriterator ... Read More

Advertisements