stock market

The stock market is a marketplace where buyers and sellers trade shares of publicly listed companies. It allows people to invest in businesses, and companies to raise money for growth.

What is a Stock?

A stock represents ownership in a company. If you buy one share of a company, you become a part-owner  of that company.

For example:

  • If you buy 10 shares of Tata Motors, you own a small piece of Tata Motors.

  • If the company does well, its stock price rises—you can make a profit by selling your shares at a higher price.

  • If the company pays dividends, you earn regular income as a shareholder.

  • stock market

    How to Change Default Behavior in Spring Security

    1. What Spring Security Does ?. Spring Security helps you control who can access your application and what they can do. 1. Authentication (Who are you?) 2. Authorization (What can you do?) 3. Protection Against Attacks Spring Security includes built-in defenses for: if you want to learn the default behavior of spring security , default spring security. 2. What is anyRequest() anyRequest() is a matcher that applies to all remaining HTTP requests that have not been matched by previous rules. 3.What is permitAll() permitAll() allows unrestricted access to a resource , no authentication required — anyone can access . we can permit all the requests coming towards our web applications…

  • stock market

    Graph Data Structure and Algorithms: A Complete Beginner’s Guide

    What is Data Structure . A Data structure is specialized format for organizing , processing , retrieving and storing data . it defines the relationship between data and the operations. that can be performed of the data common data structures include arrays , linked lists ,stacks , queues , tree and graph . Benefits of data structures 2.What is a Graph Data Structure? A Graph is a non‑linear data structure that represents relationships between pairs of objects.It consists of: Example: Adjacency Two vertices are said to be adjacent to one another if they are connected by a single edge . Paths : A path is a sequence of edges. Connected…

  • stock market

    What is Decorator Design Pattern? Learn with Real-World Examples

     1. What is a Design Pattern. A design pattern is a proven, reusable solution to a commonly occurring software design problem. It represents best practices developed by experienced software developers to solve recurring problems in object‑oriented design. 2. What is Decorator Design Pattern . Decorator Pattern allows behavior to be added to an object dynamically without modifying its existing code. Decorator Design Pattern  Implementation of Decorator: In decorator methods we provide additional behaviour on top that provided by concrete component instance  3.Why Decorator Pattern is Needed 1. Avoids Too Many Subclasses Instead of creating multiple subclasses, decorators allow you to combine features dynamically. Example: 2. Adds Features at Runtime You can wrap an object with additional…

  • stock market

    Composite Design Pattern in Java: Complete Guide with Real-Time Examples

     1. What is a Design Pattern. A design pattern is a proven, reusable solution to a commonly occurring software design problem. It represents best practices developed by experienced software developers to solve recurring problems in object‑oriented design. 2. What is the Composite Design Pattern. The Composite Design Pattern composes objects into tree structures to represent part‑whole hierarchies and allows clients to treat individual objects and groups of objects in the same way. 3. Problem Statement (Why We Need Composite) The Composite Design Pattern is needed when we want to work with hierarchical (tree‑like) structures and treat individual objects and groups of objects in the same way. Without Composite, systems become:…

  • stock market

    Builder Design Pattern Tutorial with Practical Examples in Java

    1. What is a Design Pattern. A design pattern is a proven, reusable solution to a commonly occurring software design problem. It represents best practices developed by experienced software developers to solve recurring problems in object‑oriented design. 2. What is builder design pattern ? . In builder design pattern we removed the logic related to object constructor from client code & abstract it in separate class. This pattern was introduced to solve some of the problems with factory design pattern when the object contains a lot of attributes . major issues with factory design pattern is when object contains a lot of attributes. Some of the parameters might be optional but in factory pattern. we are…

  • stock market

    How to Implement Singleton Design Pattern in Java (Step-by-Step)

    What is singleton design pattern A Singleton Pattern says that just “define a class that has only one instance and provides a global point of access to it . If singleton class is loaded by two classloaders, two instance of singleton class will be created, one for each classloaders. Key Concepts 1. Significance of Serialization in Singleton Pattern Serialization in Java means converting an object into a byte stream so it can be: Deserialization is the reverse process (byte stream → object). Even if your class ensures only one instance, deserialization creates a NEW object, which violates the Singleton rule. Example: Singleton Class (Without Protection) 2.TestSingleton.java output false // false…

  • stock market

    What is a Linked List? Types, Operations, and Real-World Examples

    Why Do We Need Linked Lists? In real programming, data size is often unknown or frequently changing. Arrays create problems in such situations. Arrays Issues are . To overcome the above issues LinkedList comes into the pictures . Linked Lists are fundamental data structure in computer science and they offer several advantages . Types of LinkedList 1. Singly Linked List A Singly Linked List is a type of linked list data structure in which each node contains data and a reference (pointer) to the next node only. It is called singly because every node connects in one direction — from the current node to the next node. Structure of Singly…

  • stock market

    What is Generative Ai

    Generative AI creates brand-new content such as text, images, music, or code instead of only analyzing existing data. This creative ability makes it revolutionary for businesses and is rapidly changing industries. AI (Artificial Intelligence) Artificial Intelligence (AI) is a broad field of computer science that focuses on building intelligent systems capable of performing tasks that typically require human intelligence. These tasks include learning, problem-solving, decision-making, and data analysis. What AI can do: Examples of traditional AI: GenAI (Generative AI) GenAI focuses on generation — producing new content using patterns learned from data. Generative AI is a subset of AI that can create new content such as: It uses models like…

  • stock market

    How Data Structures Make Your Code Faster

    Before the concept of data structures, data was often managed using simple linear storage methods. What is Data Structure . A Data structure is specialized format for organizing , processing , retrieving and storing data . it defines the relationship between data and the operations. that can be performed of the data common data structures include arrays , linked lists ,stacks , queues , tree and graph . Benefits of data structures How the variable can store this line when compiler compiles this line . When jvm reads int a it reserve space in stack memory for variable a . When jvm executes a=10; Primitive data type memory allocation Example…

  • stock market

    Adapter Design Pattern in Java with UML Diagram and Real Use Cases

    We have an existing object which provides the functionality that client needs , but Client code cannot use this object because it expects an object with a different interface. Using adapter design pattern we make this object work with client by adopting the object to client expects interface . this pattern is also called as wrapper as its wrap existing objects . Adapter design pattern is used so that two unrelated interface can work together, the object that joins these unrelated interface is called as adapter . Adapter design pattern we can implement using 1. Class Adapter : this form uses java Inheritance and extends the source interface Adaptee: our…

  • stock market

    What is design pattern

    Design Patterns are proven, reusable solutions to common problems that occur while designing software systems . A Design Pattern is: Why Design Patterns Are Important Categories (Types) of Design Patterns Design patterns are mainly divided into three major categories 1. Creational Design Patterns Instead of creating objects directly, these patterns control how objects are created. 2. Structural Design Patterns 3.Behavioral Design Patterns Behavioral design pattern Focus on communication between objects. They define how objects interact and share responsibilities. Behavioral patterns are Example: Create objects from one central place. Client does NOT know how objects are created. 1. Create Interface 2. Create Classes 3. Factory Class 4.Client Code

  • stock market

    Python Script to Identify Hammer Candlestick Patterns in Trading Data

    The Hammer candlestick forms when the open, high, and close are nearly the same, with a long lower shadow signaling a bullish rejection by buyers aiming to drive the market higher.The hammer is a reversal candlestick pattern when it occurs at the bottom of a downtrend . Characteristics of a Hammer Candlestick: Interpretation: Bullish Reversal Signal: The long lower shadow indicates that sellers pushed the price down significantly during the trading session, but strong buying pressure ultimately drove the price back up near the opening level. This suggests that buyers are starting to gain control. Hammer Implementation in python Line-by-Line Explanation 1. Importing Libraries 2. Change Current Working Directory 3.…

  • stock market

    Factory Design Pattern in Java for Beginners

    The Factory Design Pattern is a creational design pattern used to create objects without exposing the object creation logic to the client. Instead of using the new keyword directly, the client relies on a factory method to get the required object. Factory Design pattern is used when we have a super class with multiple subclass and based on input , we return the one of the subclasses . Super class in factory pattern can be an interface , abstract class ,or a normal java class . Example : Computer.java Pc.java Server.java ComputerFactory.java TestFactoryMain.java

  • stock market

    Function Functional Interface in Java 8 – Definition, Syntax & Real-World Use Cases

    The Function functional interface is a predefined interface introduced in Java 8 as part of the java.util.function package. It represents a function that accepts one input argument and produces one result. This interface is widely used in lambda expressions, Stream API operations, and functional programming. A key feature of the Function interface is that it enables developers to define reusable transformation logic, where an input object is converted into another form. For example, converting a String into its length, a Student object into a grade, or an entity into a DTO. Function is functional interface that takes one argument and produces a result . Syntax: Program1 : Write a program…

  • stock market

    Predicate Functional Interface in Java 8 – Definition, Syntax & Real-World Use Cases

    Java 8 introduced the concept of functional programming in Java through Lambda Expressions.To support this, Java provides a rich set of predefined functional interfaces . An Interface which contains single abstract method and any number of default and statics method .all predefined functional interface present in java.util.function package. Main Types of Predefined Functional Interfaces 1.Predicate : A predicate is a functional interface that represents a Boolean valued function of one argument . predicate takes one input and return either true or false . the Predicate functional interface is mainly used to represent business conditions or validation rules that return a boolean result and are frequently applied in filtering operations. A…