jQuery Examples

There are many features, built-in functions, and effects in jQuery and millions of associated examples. Some of the simple examples of jQuery are discussed below. Example1: <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <script> $(document).ready(function(){ $(“p”).click(function(){ $(this).hide(); }); }); </script> </head> <body> <p>Hello world</p> <p>If you don’t like me, click me away!</p> </body> </html> Example2: <!DOCTYPE … Read more

jQuery History

The jQuery project started back in 2005. jQuery now became a widely used technology, since its first release in January 2006. It was released at BarCamp NYC by John Resig. The development of jQuery was influenced by the release of CSS Query by Dean Edwards. jQuery is currently headed by Timmy Wilson. While a team … Read more

What is jQuery?

jQuery is a fast, small, lightweight, cross-platform, and feature-rich JavaScript library. jQuery provides various features that make web development very quick and easy. Some of the basic and unique features of jquery are listed below: Very fast and extensible. Versatile. Small and lightweight. Platform-independent. Easy to learn; coding style same as JavaScript. Provides cross-browser support; … Read more

how hashset works internally in java?

HashSet uses HashMap internally to store its elements. When we create a HashSet, internally a HashMap is created. The elements inserted in HashSet are actually inserted as the keys in HashMap. Kindly click here to look at internal working of HashMap to see how hashset works internally.

How hashmap stores null key?

In Hashmap one null key is allowed and multiple null values are allowed. Since hashcode of null is 0 so null key actually stored at index 0 in hashmap. Hashmap in java actsually created as Array of linkedlist where index in array is find out by hashing on key. package com.w3schools; import java.util.HashMap; import java.util.Map; … Read more

HashMap internal working in java

HashMap: HashMap in java is represents a collection type which can contains the objects/elements in key-value pair form. It extends AbstractMap class and implements the Map interface. It not maintains any order for its elements. It not allowed duplicate values as key. It can have only one null key and multiple null values. HashMap uses … Read more

hashCode and equals method in java

The hashCode() method in java is an Object class method. It returns a hash code value (an integer number) for the object which represents the memory address of the object. It is supported for the benefit of hashtables such as those provided by java.util.Hashtable. Conceptually: The hashCode() is used for bucketing in Hash implementations like HashMap, HashTable, HashSet, etc. The value received from hashCode() is … Read more

Java networking tutorial

Java network programming provides the facility of connecting two or more computing devices together. The devices communicate with each other using either the Transmission Control Protocol (TCP) or the User Datagram Protocol (UDP). The java.net package provides the classes for java network programming. TCP protocol is used by URL, URLConnection, Socket, and ServerSocket classes whereas … Read more

how to get hostname from ip address in java?

The java.net.InetAddress class represents an IP address. It provides the methods to work with IP and host name. Get hostname from ip address in java package com.w3schools; import java.net.InetAddress; public class NetworkTest { public static void main(String args[]){ try { InetAddress host = InetAddress.getByName(“107.180.2.128”); System.out.println(host.getHostName()); } catch(Exception e) { e.printStackTrace(); } } } Output ip-107-180-2-128.ip.secureserver.net … Read more