Posts

Showing posts from August, 2022

HTML Practicals

Practical No 2 ----------------------------------------------------------------------- <!DOCTYPE html> <html lang="en"> <head> <title>Simple HTML Page</title> </head> <body> <p><a href="#computer">Computer</a></p> <p><a href="#laptop">Laptop</a></p> <p> Computers and laptops are essential devices in today's digital world, used for various personal, professional, and educational purposes. A computer is a powerful machine that processes data and performs tasks efficiently, while a laptop is a portable version of a computer, designed for convenience and mobility. Both devices consist of key components like a processor, memory, storage, and input/output systems. While desktops offer high performance and upgradability, laptops provide flexibility and ease of use, making them ideal for people who need computing power on the go. With continuous advancem...

HTML Code for Login

<html>     <head>         <title>             Pirmohammad sheikh         </title>     </head>     <body>         <form action = "" >             Email ID <input type = "text" >             Password   <input type = "password" >             <input type = "submit" value = "Log In" >         </form>     </body> </html> Pirmohammad sheikh Email ID Pssword Pirmohammad sheikh @gmail.com Show Password For new line we write <br> tag ...

TreeSet class

The objects of the TreeSet class are stored in ascending order. The important points about the Java TreeSet class are: Java TreeSet class access and retrieval times are quiet fast. Java TreeSet class doesn't allow null element. Java TreeSet class is non synchronized. Java TreeSet class maintains ascending order. The TreeSet can only allow those generic types that are comparable. For example The Comparable interface is being implemented by the StringBuffer class.

LinkedHashSet Class

It inherits the HashSet class and implements the Set interface. Java LinkedHashSet class contains unique elements only like HashSet. Java LinkedHashSet class provides all optional set operations and permits null elements. Java LinkedHashSet class is non-synchronized. Java LinkedHashSet class maintains insertion order.Note: Keeping the insertion order in the LinkedHashset has some additional costs, both in terms of extra memory and extra CPU cycles. Therefore, if it is not required to maintain the insertion order, go for the lighter-weight HashMap or the HashSet instead.

HashSet Class

  HashSet Class The important points about Java HashSet class are: HashSet stores the elements by using a mechanism called hashing. HashSet contains unique elements only. HashSet allows null value. HashSet class is non synchronized. HashSet doesn't maintain the insertion order. Here, elements are inserted on the basis of their hashcode. HashSet is the best approach for search operations. The initial default capacity of HashSet is 16, and the load factor is 0.75.

Collection Framework

Image
  The Collection Interface It declares the core methods that all collections will have.