Krantik Chavan has Published 308 Articles

ATM Adaptation Layer 5 (AAL 5)

Krantik Chavan

Krantik Chavan

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

572 Views

In Asynchronous Transfer Mode (ATM) networks, the ATM Adaptation Layer (AAL) provides facilities for non-ATM based networks to connect to ATM network and use its services. International Telecommunication Union Telecommunication Standardization Sector (ITU-T) have defined several AALs for a range of services. The most widely deployed is ATM Adaptation Layer ... Read More

PPP over ATM (PPPoA)

Krantik Chavan

Krantik Chavan

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

461 Views

PPP over ATM (PPPoA) is a data link layer protocol to transmit PPP data over ATM networks, by encapsulating PPP frames in ATM Adaptation Layer 5 (AAL 5) frames.Point − to − Point Protocol (PPP) is a data link layer protocol that is used to transmit data between two directly ... Read More

Java Program to get duration between two time instants

Krantik Chavan

Krantik Chavan

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

206 Views

Create two time instants:Instant time1 = Instant.now(); Instant time2 = Instant.now().plusSeconds(50);Use between() to get the duration between two time instants:long resMilli = Duration.between(time1, time2).toMillis();Exampleimport java.time.Duration; import java.time.Instant; public class Demo {    public static void main(String[] args) {       Instant time1 = Instant.now();       Instant time2 ... Read More

How to sort an array with customized Comparator in Java?

Krantik Chavan

Krantik Chavan

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

2K+ Views

Let’s say the following is our string array and we need to sort it:String[] str = { "Tom", "Jack", "Harry", "Zen", "Tim", "David" };Within the sort() method, create a customized comparator to sort the above string. Here, two strings are compared with each other and the process goes on:Arrays.sort(str, new ... Read More

Java Program to create Stream from a String/Byte Array

Krantik Chavan

Krantik Chavan

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

439 Views

Create an input stream and set the string:DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream("pqrs tu v wxy z".getBytes()));The getBytes() method is used to convert a string into sequence of bytes and returns an array of bytes.Now return one single input byte:(char) inputStream.readByte()Exampleimport java.io.ByteArrayInputStream; import java.io.DataInputStream; public class Demo { public static ... Read More

What are the important components of JDBC?

Krantik Chavan

Krantik Chavan

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

1K+ Views

To communicate with the Database using JDBC you need the following components.JDBC DriverManager: The DriverManager class of the java.sql package manages different types of JDBC drivers. This class loads the driver classes. In addition to this, whenever a new connection establishes it chooses and loads the suitable driver from the ... Read More

What are the main features of JDBC?

Krantik Chavan

Krantik Chavan

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

3K+ Views

Following are the new features of JDBC:Makes JDBC calls: While using JDBC Java applications can make JDBC calls these calls submit SQL statements to the driver which in turn accesses the data from the database.Portability: JDBC provides wide level portability.Using JDBC you can request any type of queries from the ... Read More

Explain the architecture of JDBC?

Krantik Chavan

Krantik Chavan

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

3K+ Views

If you want to develop a Java application that communicates with a database, you should use JDBC API. A driver is the implementation of the said API; various vendors provide various drivers, you need to use a suitable driver with respect to the database you need to communicate with. The ... Read More

Create LabelValue Tuple from another collection in Java

Krantik Chavan

Krantik Chavan

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

55 Views

To create LabelValue tuple from another collection, use the fromCollection() method or the fromArray() method. Here, we will be creating LabelValue from List, therefore use the fromCollection() method.Let us first see what we need to work with JavaTuples. To work with LabelValue class in JavaTuples, you need to import the ... Read More

Create KeyValue Tuple from another collection in Java

Krantik Chavan

Krantik Chavan

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

47 Views

To create KeyValue tuple from another collection, use the fromCollection() method. We will be creating the tuple from List collection. Let us first see what we need to work with JavaTuples. To work with KeyValue class in JavaTuples, you need to import the following package.import org.javatuples.KeyValue;Note: Download JavaTuples Jar library ... Read More

Advertisements