Samual Sam has Published 2310 Articles

CharBuffer wrap() method in Java

Samual Sam

Samual Sam

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

288 Views

A character array can be wrapped into a buffer using the method wrap() in the class java.nio.CharBuffer. This method requires a single parameter i.e. the char array to be wrapped into a buffer and it returns the new buffer created. If the returned buffer is modified, then the contents of ... Read More

Packet over SONET

Samual Sam

Samual Sam

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

2K+ Views

Synchronous optical networking (SONET) is a physical layer protocol for transmitting multiple digital bit streams over optical fiber links that form the backbone of the communication networks. Packet-over-SONET (POS) is a standard that maps IP packets into SONET frames. To implement this mechanism, Point – to – Point Protocol (PPP) ... Read More

How to create a read-only list in Java?

Samual Sam

Samual Sam

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

274 Views

Let us first create a List in Java −Listlist = new ArrayList(); list.add("A"); list.add("B"); list.add("C");Now to convert the above list to read-only, use Collections −list = Collections.unmodifiableList(list);We have converted the above list to read-only. Now, if you will try to add more elements to the list, then the following error ... Read More

Serial Line Internet Protocol (SLIP)

Samual Sam

Samual Sam

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

7K+ Views

Serial Line Internet Protocol (SLIP) is a simple protocol that works with TCP/IP for communication over serial ports and routers. They provide communications between machines that were previously configured for direct communication with each other.For example, a client may be connected to the Internet service provider (ISP) with a slower ... Read More

Difference between Synchronized ArrayList and CopyOnWriteArrayList in Java

Samual Sam

Samual Sam

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

1K+ Views

Synchronized ArrayList and CopyOnWriteArrayList are useful for synchronizing the ArrayList. This is necessary for a multi-threaded environment to make sure thread safety is achieved.The differences between Synchronized ArrayList and CopyOnWriteArrayList are given as follows −Synchronized ArrayListCopyOnWriteArrayListSynchronized ArrayList is used to synchronize the ArrayList.CopyOnWriteArrayList is used to synchronize the ArrayList.The Java ... Read More

How to fetch elements with iterator in Java?

Samual Sam

Samual Sam

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

305 Views

Let us first create a List and add elements −Listlist = Arrays.asList(new String[] { "P", "Q", "R", "S", "T", "U", "V", "W" });Now, use Iterator to fetch each element −Iteratori = list.iterator();Display the elements −while (i.hasNext()) {    System.out.println(i.next()); }Example Live Demoimport java.util.Arrays; import java.util.Iterator; import java.util.List; public class Demo { ... Read More

Can't find my.ini in MySQL directory?

Samual Sam

Samual Sam

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

8K+ Views

The my.ini is in hidden folder of program data. First go to C: drive and then hidden folder of program data. From that, move to the MySQL version directory.Here is the snapshot of the C: drive −Click on C drive. The snapshot is as follows. Here, you can see the ... Read More

What are JSTL Core tags in JSP?

Samual Sam

Samual Sam

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

320 Views

The core group of tags is the most commonly used JSTL tags. Following is the syntax to include the JSTL Core library in your JSP −Following table lists out the core JSTL Tags −S.No.Tag & Description1Like , but for expressions.2Sets the result of an expression evaluation in a 'scope'3Removes a ... Read More

How to find ArrayBlockingQueueis empty or not in android?

Samual Sam

Samual Sam

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

74 Views

Before getting into example, we should know what arrayblockingqueue is, it travels FIFO manner and first element going to live longest period of time and last element of the queue going to live short period of the time.This example demonstrate about How to find ArrayBlockingQueue is empty or not in ... Read More

ConcurrentLinkedQueue in Java

Samual Sam

Samual Sam

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

169 Views

The ConcurrentLinkedQueue class in Java is used to implement a queue using a concurrent linked list. This class implements the Collection interface as well as the AbstractCollection class. It is a part of the Java Collection Framework.A program that demonstrates this is given as follows −Example Live Demoimport java.util.concurrent.*; public class ... Read More

Advertisements