Alshifa Hasnain has Published 283 Articles

LinkedHashMap and LinkedHashSet in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 21-Feb-2025 17:31:59

641 Views

In this article, we will learn the LinkedHashMap and LinkedHashSet in Java. LinkedHashMap Hash table and linked list implementation of the Map interface, with predictable iteration order. Example Let us see an example − import java.util.*; public class Demo { public static void main(String args[]){ ... Read More

When is a CDATA section necessary within a script tag?

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Feb-2025 18:27:06

801 Views

When working with JavaScript inside HTML documents, developers may come across the CDATA section. It can be helpful when dealing with older XHTML documents or embedded JavaScript in XML-based markup. What is a CDATA Section? A CDATA (Character Data) section is a special syntax used in XML and XHTML documents ... Read More

Java program to pass lambda expression as a method argument

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Feb-2025 18:26:51

589 Views

In this article, we will learn to pass a lambda expression as a method argument in Java. A lambda expression is a short block of code that takes in parameters and returns a value. Lambda Expression Lambda expressions allow passing functionality as a method parameter, reducing the need for anonymous ... Read More

What is the !! (not not) operator in JavaScript?

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Feb-2025 18:26:10

602 Views

In this article, we will learn about the !! (not not) operator in JavaScript.This double negation forces a value to be evaluated as either true or false. What is the !! Operator? The double negation(!! ) operator is the! Operator twice and calculates the truth value of a value. It returns ... Read More

JavaScript closures vs. anonymous functions

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Feb-2025 18:25:54

730 Views

In this article, we will learn about JavaScript's closures and anonymous functions. JavaScript is a powerful language that allows developers to write expressive and concise code. Two concepts that often confuse beginners are closures and anonymous functions. While they share some similarities, they serve different purposes and function differently in JavaScript ... Read More

Java ResultSetMetaData getColumnLabel() method with example

Alshifa Hasnain

Alshifa Hasnain

Updated on 20-Feb-2025 18:25:33

690 Views

In this article, we will learn the ResultSetMetaData getColumnLabel() method in Java. When working with databases in Java, the ResultSetMetaData interface provides valuable information about the structure of a ResultSet, such as column names, types, and properties.  What is getColumnLabel()? The getColumnLabel() method of the ResultSetMetaData (interface) retrieves the display name ... Read More

How to globally disable an animation using jQuery?

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Feb-2025 17:51:17

955 Views

In this article, we will learn to globally disable an animation using jQuery. In jQuery, animations are commonly used to create smooth transitions and effects. However, there might be scenarios where you want to disable animations globally, such as improving performance on low-powered devices or creating an instant response for ... Read More

What is the difference between null and undefined in JavaScript?

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Feb-2025 17:51:05

6K+ Views

In this article, we will learn about the difference between null and undefined in JavaScript. In JavaScript, null and undefined represent the absence of a value, but they have different meanings and use cases. What is undefined in JavaScript? It means a variable declared, but no value has been assigned ... Read More

How do we add a table row in HTML?

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Feb-2025 17:50:49

847 Views

In this article, we will learn to add a table row in HTML. Tables are a fundamental part of web development, used to display structured data in rows and columns. In HTML, you can add table rows using the (table row) element inside a structure. Attributes The HTML ... Read More

Java program to cube sum of first n natural numbers

Alshifa Hasnain

Alshifa Hasnain

Updated on 19-Feb-2025 17:50:35

545 Views

In this article, we will learn to write a Java program to calculate the sum of cubes of the first n natural numbers. Understanding the Cube Sum Formula The sum of cubes of the first n natural numbers follows a mathematical formula − S = 13 + 23 + 33 ... Read More

Advertisements