To establish a reliable service between two machines on a network, transport protocols are implemented, which somehow resembles the data link protocols implemented at layer 2. The major difference lies in the fact that the data link layer uses a physical channel between two routers while the transport layer uses a subnet.Following are the issues for implementing transport protocols−Types of ServiceThe transport layer also determines the type of service provided to the users from the session layer. An error-free point-to-point communication to deliver messages in the order in which they were transmitted is one of the key functions of the ... Read More
To test whether a row exists in a MySQL table or not, use exists condition. The exists condition can be used with subquery. It returns true when row exists in the table, otherwise false is returned. True is represented in the form of 1 and false is represented as 0.For better understanding, firstly we will create a table with the help of CREATE command. The following is the query to create a table −mysql> CREATE table ExistsRowDemo -> ( -> ExistId int, -> Name varchar(100) -> ); Query OK, 0 rows affected (0.53 sec)After creating the table successfully, we will ... Read More
You can get the current date in Java in various ways. Following are some of them −The constructor of Date classThe no-arg constructor of the java.util.Date class returns the Date object representing the current date and time, using this you can print the current date as shown below −ExampleLive Demoimport java.text.SimpleDateFormat; import java.text.ParseException; import java.util.Date; public class Demo { public static void main(String args[])throws ParseException { Date date = new Date(); SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yy"); String str = formatter.format(date); System.out.print("Current date: "+str); } ... Read More
The main memory is the fundamental storage unit in a computer system. It is associatively large and quick memory and saves programs and information during computer operations. The technology that makes the main memory work is based on semiconductor integrated circuits.RAM is the main memory. Integrated circuit Random Access Memory (RAM) chips are applicable in two possible operating modes are as follows −Static − It consists of internal flip-flops, which store the binary information. The stored data remains solid considering power is provided to the unit. The static RAM is simple to use and has smaller read and write cycles.Dynamic ... Read More
In the top-down approach, a bigger module/problem is divided into smaller modules. In contrast, in the bottom-up approach, the smaller problems are solved and then they are integrated to find the solution of a bigger problem. Read this article to learn more about top-down approach and bottom-up approach and how they are different from each other. What is Top-Down Approach? Top-Down Approach is an approach to design algorithms in which a bigger problem is broken down into smaller parts. Thus, it uses the decomposition approach. This approach is generally used by structured programming languages such as C, COBOL, FORTRAN. The ... Read More
A JSON array is an ordered collection of values that are enclosed in square brackets i.e., it begins with '[' and ends with ']'. The values in the arrays are separated by ', ' (comma).Sample JSON array{ "books": [ Java, JavaFX, Hbase, Cassandra, WebGL, JOGL] }The JSON-simple is a light weight library which is used to process JSON objects. Using this you can read or, write the contents of a JSON document using Java program.JSON-Simple maven dependencyFollowing is the maven dependency for the JSON-simple library − com.googlecode.json-simple json-simple ... Read More
Query is a question or requesting information. Query language is a language which is used to retrieve information from a database.Query language is divided into two types −Procedural languageNon-procedural languageProcedural languageInformation is retrieved from the database by specifying the sequence of operations to be performed.For Example: Relational algebra.Structure Query language (SQL) is based on relational algebra.Relational algebra consists of a set of operations that take one or two relations as an input and produces a new relation as output.Types of Relational Algebra operationsThe different types of relational algebra operations are as follows −Select operationProject operationRename operationUnion operationIntersection operationDifference operationCartesian product ... Read More
This tutorial will teach us to call a JavaScript function on page load. In many cases, while programming with HTML and JavaScript, programmers need to call a function, while loading the web page or after the web page load finishes. For example, programmers need to show the welcome message to the user on page load, and the programmer needs to call a JavaScript function after the page load event.There are various ways to call a function on page load or after page load in JavaScript, and we will look at them one by one in this tutorial.Using the onload event ... Read More
To check whether a character is in Uppercase or not in Java, use the Character.isUpperCase() method.We have a character to be checked.char val = 'K';Now let us use the Character.isUpperCase() method.if (Character.isUpperCase(val)) { System.out.println("Character is in Uppercase!"); }else { System.out.println("Character is in Lowercase!"); }Let us see the complete example now to check for Uppercase in Java.Example Live Demopublic class Demo { public static void main(String []args) { System.out.println("Checking for Uppercase character..."); char val = 'K'; System.out.println("Character: "+val); if (Character.isUpperCase(val)) { System.out.println("Character is ... Read More
The Database Management System (DBMS) is defined as a software system that allows the user to define, create and maintain the database and provide control access to the data.It is a collection of programs used for managing data and simultaneously it supports different types of users to create, manage, retrieve, update and store information.PurposeThe purpose of DBMS is to transform the following −Data into information.Information into knowledge.Knowledge to the action.The diagram given below explains the process as to how the transformation of data to information to knowledge to action happens respectively in the DBMS −Previously, the database applications were built ... Read More