- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2383 Articles
karthikeya Boyini
100 Views
The LinkedBlockingQueue Class in Java has a blocking queue that is optionally bounded and based on linked nodes. This means that if the capacity is provided then the LinkedBlockingQueue is bound, otherwise it is not bound. Also, FIFO for ordering elements.A program that demonstrates this is given as follows −Example Live ... Read More
karthikeya Boyini
141 Views
The tag maps key to the localized message and performs the parametric replacement.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultkeyMessage key to retrieveNoBodybundleResource bundle to useNoDefault bundlevarName of the variable to store the localized messageNoPrint to pagescopeThe scope of the variable to store the localized messageNoPageExample ... Read More
karthikeya Boyini
16K+ Views
Sorting a vector in C++ can be done by using std::sort(). It is defined in header. To get a stable sort std::stable_sort is used. It is exactly like sort() but maintains the relative order of equal elements. Quicksort(), mergesort() can also be used, as per requirement.AlgorithmBegin Decalre v of ... Read More
karthikeya Boyini
451 Views
Let’s say the following is our Collection i.e. ArrayList −Listlist = new ArrayList(); list.add(100); list.add(200); list.add(200); list.add(200); list.add(300); list.add(400); list.add(400); list.add(500);Now, create another Collection −List list2 = new ArrayList(); list2.add(100); list2.add(200); list2.add(300); list2.add(400);To remove all elements from a Collection in another Collection, try the following with list and list2 as ... Read More
karthikeya Boyini
73 Views
A duplicate buffer of a buffer can be created using the method duplicate() in the class java.nio.CharBuffer. 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
karthikeya Boyini
157 Views
You can use lc_messages to change MySQL error message language. The syntax is as follows −SET lc_messages = 'yourLanguage';To understand the concept, let us create a table with some error and check the error message language.Here, we have set the local message to French. Let us first create a table ... Read More
karthikeya Boyini
160 Views
The JSTL SQL tag library provides tags for interacting with relational databases (RDBMSs) such as Oracle, MySQL, or Microsoft SQL Server.Following is the syntax to include JSTL SQL library in your JSP −Following table lists out the SQL JSTL Tags −S.No.Tag & Description1Creates a simple DataSource suitable only for prototyping2Executes ... Read More
karthikeya Boyini
155 Views
First, create an Integer array −Integer[] strArray = new Integer[] { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 };Now, convert it into a List −Listlist = Arrays.asList(strArray);Use Collections to shuffle as shown below −Collections.shuffle(list);Example Live Demoimport java.util.Arrays; import java.util.Collections; import java.util.List; public class Demo { public static ... Read More
karthikeya Boyini
72 Views
The PriorityBlockingQueue Class in Java has a blocking queue that has unbounded functionality and is based on the class PriorityQueue with the same ordering rules. The PriorityBlockingQueue Class is a part of the Java Collection Framework.A program that demonstrates this is given as follows −Example Live Demoimport java.util.concurrent.PriorityBlockingQueue; public class Demo ... Read More
karthikeya Boyini
2K+ Views
Let us first create a List and add elements −ArrayListarrayList = new ArrayList(); arrayList.add("100"); arrayList.add("200"); arrayList.add("300"); arrayList.add("400"); arrayList.add("500");Now, iterate over it with Lambda Expressions −ArrayListlist = arrayList; System.out.println("Iterating..."); list.stream().forEach(elem -> System.out.println(elem));Example Live Demoimport java.util.ArrayList; import java.util.List; public class Demo { public static void main(String[] args) { ArrayListarrayList ... Read More