Trending December 2023 # Circular Flow Of Income: Definition, Examples, Types, Methods # Suggested January 2024 # Top 14 Popular

You are reading the article Circular Flow Of Income: Definition, Examples, Types, Methods updated in December 2023 on the website We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested January 2024 Circular Flow Of Income: Definition, Examples, Types, Methods

Circular Flow of Income Meaning

The Circular Flow of Income is a macroeconomic concept explaining how income or money flows through various sectors of an economy. 

For example, McDonald’s uses dollars to pay the landlord for the space it rents or its employees’ salaries. In either scenario, the dollar returns to someone’s wallet after entering their household’s income. The family or someone from the family then uses the received payment to spend on food at McDonald’s. Thus, the money finally returns to the beginning of the flow.

Start Your Free Investment Banking Course

Download Corporate Valuation, Investment Banking, Accounting, CFA Calculator & others

Key Highlights

The circular flow of income explains the flow of money from producers to households and back to the producers.

There are two aspects to this concept, namely, real flow and money flow

The three primary methods involved in the process are value-added, income, and expenditure method

Its analysis helps the government determine and adjust its monetary and fiscal policy.

Circular Flow of Income- How Does it Work?

Usually, businesses, individuals, and the government runs an economy

In a free market, companies produce and sell products to earn revenue. They use the income to pay wages to people who outsource their services to these firms

The households then partially spend their income on food, clothing, entertainment, etc., and use the rest for savings and buying things outside of the economy (imports), also called leakages

To equalize the leakages, some firms do business outside the country (exports), and some borrow money for investment. It is known as an injection, as the money eventually returns to the flow

The money spent on necessities by the citizens returns to the firms, which explains the Circular Flow of Income.

Example of Circular Flow of Income Example #1:

A ketchup factory’s factors of production are tomatoes, industrial land, and laborers. As a result, the households enjoy monetary compensation for the rented industrial land, farmers profit from selling tomatoes, and the laborers get wages.

Once the final ketchup bottles are in the market, the households purchase the ketchup bottles using wages, rent, or profits. The money goes to the producers, and factory owners, eventually completing the circular flow.

Example #2:

As a result, she uses the money from the rent to buy the furniture. Therefore, the money the XYZ company paid as the rent came back to them as business profits. It explains the income circular flow.

Circular Flow of Income Types Real Flow

It is the flow of factor services, like land, labor, and entrepreneurship, from households to companies

There is no involvement of money; both sides only exchange services

It generally helps determine an economy’s growth.

Money Flow

It explains the movement of money from the flow of factor payments, such as rent, wages, and interest from firms to households.

Here, there is an exchange of funds between households and firms

Nominal flow is another name for money flow.

Methods of Calculation & Formulas Value-added Method

This method calculates the national income as per the different production phases of goods and services

It aims to calculate the value added to the product during the various stages of production.

Formula: National Income = Net Domestic Product at Factor Cost + Net factor income from abroad

Income Method

This method totals the income individuals earn in exchange for their services. It takes into account the rent, interest payments, wages, and profits

It is also known as NDPfc, i.e., net domestic product at factor cost.

Formula: National Income = Rent + Wages + Profit + Interest + Mixed Income

Expenditure Method

It calculates the expenditures of individuals, businesses, and the government

The formula sums the consumer purchase (C), government expenditure (G), investments by business firms (I), and net exports (NX).

Formula: National Income = C + G + I + NX

Final Thoughts

The Circular Flow of Income is the economic concept of the constant flow of money. It shows the interdependence of different economic sectors. In addition, it highlights the link between earning and spending in an economy. Thus, it becomes vital to understand the income flow to understand the economic wealth of a nation.

Frequently Asked Questions(FAQs) Q1. What are the four sectors in the circular flow of income? Q2. What are the three primary income flows of an economy?

Answer: Total production, income, and spending are the three ways income flows in an economy. Production concerns the entire demand and supply of goods and services. On the other hand, income and spending consider the cash inflow and outflow through the economy.

Q3. What are Leakages and Injections in the Circular Flow of Income?

Answer: While leakages are withdrawals of money from the circular flow, injections are the addition of money. Leakage happens when individuals save money that does not pass through the regular flow—for example, savings, imports, and taxes. Injection occurs when households/firms borrow money from institutes like banks. It helps increase the flow of income in an economy—for example, investment, exports, and government expenditure.

Q4. What are the different phases of the Circular Flow of Income?

Answer: There are three phases in the circular flow of income: Generation, distribution, and disposition. In the generation phase, the firms initiate the production of goods and services with the aid of the factor service. In the distribution phase, income factors like rent, wages, etc., move from the firms to households. The last phase, i.e., the deposition phase, the public utilizes their income on the goods and services the firms generate.

Recommended Articles

This article entails information about the circular flow of income. It explains its types, examples, and more. You can learn more about similar topics from the following articles,

You're reading Circular Flow Of Income: Definition, Examples, Types, Methods

Certificate Of Insurance (Coi): Definition, Types, Importance

What is a Certificate of Insurance?

A certificate of insurance is proof of an insurance policy issued by an insurance company. For example, James wants to rent an office space in New Jersey. His landlord requests property insurance. As James has renters insurance, he provides his landlord with the COI and rents the place.

Start Your Free Investment Banking Course

Download Corporate Valuation, Investment Banking, Accounting, CFA Calculator & others

Key Highlights

It provides evidence that the individual/company has valid insurance, which they can provide for customer documentation.

Businesses, customers, and others need it to confirm the coverage they require.

Types of this certificate would include a certificate of general liability, automobile liability, and workers’ compensation insurance.

It is crucial when one wants to renew their insurance policies, and it also safeguards the insured against insurance fraud.

Certificate of Insurance Types Certificate of Liability Insurance:

It is a policy that protects the insured from any losses that may arise from a third-party lawsuit

General Liability Insurance covers the insured for liability arising from accidents or injuries to a third party, property damage, and other risks.

Another is Professional Liability Insurance, which covers professionals who may be liable to their clients for damages, such as architects, engineers, lawyers, accountants, and doctors.

Certificate of Automobile Liability Insurance:

It is a report to certify that the person has their vehicle insured. For instance, the Department of Motor Vehicles (DMV) issues the certificate for the State of California.

If the insured causes an accident, the insurance pays for the other vehicle’s repairs and medical expenses incurred by the other driver or passengers.

One must submit their certificate to the automobile department, like DMV, if they get into an accident with an uninsured driver.

Certificate of Workers Compensation Insurance:

Its purpose is to prove that the employer has the policy to cover any injuries an employee/worker may sustain on the job. Additionally, the employee cannot sue the business with a COI.

This document shows up on an injured employee’s insurance claim. Thus, the employer must give them the certificate within 24 hours of the injury.

Workers’ compensation insurance covers medical expenses, income replacement, and death benefits. One can get this insurance through a private company or their state’s workers’ compensation program.

Who may Require a Certificate of Insurance?

Firms with customers or clients requiring proof of insurance must obtain the certificate. This document provides evidence that they have the necessary coverage in place.

Businesses must have certain types of insurance, such as workers’ compensation and liability insurance, to protect those employees.

Landlords, event venue managers, and others sometimes require to have COI

It is necessary for vehicle and property owners as well.

How to Obtain a Certificate Of Insurance?

The first step will be to gather all essential information regarding the insurance and fill out a COI form with the respective insurance company.

It could be through most companies’ customer support areas and even online.

The company may take a few days or weeks to create the certificate to verify the data.

Once done, the insured receives the certificate via email, mail, or the website. The insured can print it as a paper version of the certificate if it is a soft copy.

Importance of Certificate of Insurance

It protects businesses from being liable for damages caused by employees or customers.

It is an essential document for employees in the workplace. And it also verifies that the employee has insurance coverage in case of an accident or injury while on the job, especially in high-risk jobs like construction.

It’s an important document when one wants to get new insurance, transfer their policy, or need to renew current policies.

It saves the insured from insurance scams or frauds as they possess proof of insurance.

It also offers a quick overview of the insurance plan.


Insurance certificates provide many benefits to businesses. It shows customers the firm’s commitment to protecting them from harm. It also makes it easier to get a new policy when there’s a change in the business structure or location. Consult with an insurance agent or broker to ensure you have the correct type of certificate for your needs. Finally, remember to keep the document safe to access it when needed.

Frequently Asked Questions(FAQs) Q1. What is the certificate of insurance? Q2. What is the difference between an insurance policy and a certificate?

Answer: While an insurance policy is a contract between the insured and the insurer, a certificate is simply evidence of insurance coverage.

Q3. What is a transport insurance certificate?

Answer: A transport insurance certificate is a document that details the policy number and the coverage contracted. It attests to establishing risk coverage on the goods/logistics operations during international transport.

Q4. When is a certificate of insurance needed from a provider?

Answer: It is typically required when contracting with another business or individual. This document provides proof that the insured has the minimum insurance required by the other party. The certificate also states the effective dates of the policy, the policy limits, and the named insured.

Recommended Articles

This is a guide to the Certificate of Insurance. It explains its meaning, types, participants, etc. Please read the following article for more details,

Different Methods Of Tkinter Icon With Examples

Introduction to Tkinter Icon

Python encompasses various libraries that serve different purposes. Among them is Tkinter, a library employed in Python for constructing Graphical User Interfaces (GUIs). Tkinter is the easiest and fastest way to create Graphical User Interfaces in Python, and it also provides an object-oriented interface to the Tk GUI toolkit, which is very powerful. Tkinter icon is a way to put up our own customized icon on the different windows created by Tkinter. It is one of the most important parts of creating a Graphical User Interface. This article represents the different methods of the Tkinter icon and how it can be used in the different aspects of a GUI.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others


Iconphoto() Method

iconphoto(self, default = False, *args)

Iconbitmap Method

call() Method

Methods of Tkinter Icon

Lets us discuss methods with Examples and their working:

 1. Iconphoto() Method

This method places a title bar icon on any top-level window. For setting up an image as the icon, the image needs to be an object of PhotoImage class.

Image used in example [i] & example [ii]-

Image used in example [iii]-

 [i] Basic Iconphoto() Usage Example

This is a basic example of creating a top-level window and putting up an image as its icon.


# Firstly import Tkinter Module from tkinter import * from chúng tôi import * import tkinter as tk # Then create a program Tkinter window program = Tk() # Photoimage class is created # And Image should be in the same folder where there is script saved p1 = PhotoImage(file = 'C:/Users/afu/Desktop/tk/Git.png') # Icon set for program window program.iconphoto(False, p1) # Button creation b = Button(program, text = 'Press Me!') b.pack(side = TOP) program.title('iconphoto() method') mainloop()


[ii] Advance Iconphoto() Usage Example


# Firstly import Tkinter Module from tkinter import * from chúng tôi import * from tkinter import Button import tkinter as tk # Then create a program Tkinter window program = Tk() # Photoimage class is created # And Image should be in the same folder where there is script saved p1 = PhotoImage(file = 'C:/Users/afu/Desktop/tk/Git.png') # Icon set for program window program.iconphoto(False, p1) # Button creation b = Button(program, text = 'Press Me!') b.pack(side = TOP) class Icon(Frame): def __init__(code): super().__init__() code.UI() def UI(code): framedesign = Frame(code, borderwidth=10) framedesign.pack() button1 = Button(framedesign, activebackground = 'SlateGray3', text='Change my color', bg = 'red') button1.pack(padx=5, side=LEFT) label1 = Label(framedesign, background='SlateGray3', width = 15) label1.pack(padx=5, side=LEFT) button2 = Button(framedesign, text='Mine too',background='blue', activebackground = 'SlateGray3') button2.pack(side=LEFT) label2 = Label(framedesign, background='SlateGray4',width = 15) label2.pack(side=LEFT) button3 = Button(framedesign, text='I am Green', background='crimson', activebackground = 'DarkSeaGreen3' ) button3.pack(side=RIGHT, padx=5) label3 = Label(framedesign, background='DarkSeaGreen3',width = 15) label3.pack(side=RIGHT, padx=5) button4 = Button(framedesign, text='Me too', background='pink',activebackground = 'DarkSeaGreen4') button4.pack(side=RIGHT) label4 = Label(framedesign, background='DarkSeaGreen4', width = 15) label4.pack(side=RIGHT) code.master.title("Advance iconphoto() method'") code.pack(fill=BOTH) code.pack() app = Icon() program.mainloop()


[iii] Advance Iconphoto() usage example with texts using multiple fonts

This example represents a way to create a window that sets up an image as its icon using an icon photo, and it also represents a way to set up different fonts in a window.


import tkinter as tk from tkinter import Tk from tkinter import BOTH from chúng tôi import Frame from chúng tôi import Label , Style from chúng tôi import Notebook program = tk.Tk() program.iconphoto(False, tk.PhotoImage(file='C:/Users/afu/Desktop/tk/Folder.png')) from chúng tôi import Font class Icon(Frame): def __init__(code): super().__init__() code.UI() def UI(code): code.master.title("program.iconphoto method example") code.pack(fill=BOTH, expand=True) text = "This example if for creating an icon " text1 = 'using program.iconphoto' text2 = 'Hope you like it' thefont = Font(family="Arial", size=16) label1 = Label(code, text=text, font=thefont) label1.grid(row=0, column=0) label2 = Label(code, text=text1, font="Times") label2.grid(row=1, column=0) label3 = Label(code, text=text2, font=('Courier', '18', 'bold')) label3.grid(row=2, column=0) app = Icon() program.mainloop()


 2. Iconbitmap Method

For using this method, the bitmap image should be an icon type with .ico as its extension.

[i] Basic Iconbitmap Usage Example

This is a basic example of creating a window where the icon has been set using iconbitmap. As you can see, the image is of .ico extension, and using an icon-type image in this method is mandatory.


import tkinter as tk program = tk.Tk() program.title('iconbitmap method basic example') #Setting Icon for window widget program.iconbitmap('New.ico') program.mainloop()


[ii] Advance Iconbitmap Usage Example with Different Messages on pressing Buttons

This example shows us how to create a window with a bitmap image as its icon and buttons that display messages or ask questions when it is pressed. This example also explains how to make the window more responsive to questions and messages.


import tkinter as tk from tkinter import Frame, Tk from tkinter import Button from tkinter import LEFT, messagebox from tkinter import BOTH program = tk.Tk() program.iconbitmap('New.ico') #Setting Icon for window widget class Icon(Frame): def __init__(code): super().__init__() code.UI() def UI(code): framedesign = Frame(code, borderwidth=10) framedesign.pack() def Result(): tk.messagebox.showinfo( "Info", "Advance iconbitmap usage") def End(): MsgBox = tk.messagebox.askquestion ('End','Have you understood this program',icon = 'warning') if MsgBox == 'yes': program.destroy() else: tk.messagebox.showinfo('Return','Check our courses on Python on EduCBA') def Thanks(): tk.messagebox.showinfo( "Thanks", "Bbye, All the best for your future") button1 = tk.Button(framedesign, text='Know about me', command = Result, activebackground = 'Cyan') button1.pack(padx=5,side=LEFT) button2 = Button(framedesign, text='Question', width=8, command = End, activebackground = 'Cyan') button2.pack(padx=5, side=LEFT) button3 = Button(framedesign, text='Thanks', width=5, height=4, command = Thanks, activebackground = 'Cyan') button3.pack(side=LEFT) code.master.title("Advance iconbitmap usage Example with different text on buttons") code.pack(fill=BOTH) code.pack() app = Icon() program.mainloop()


When Code is Executed

When “Thanks” Button is Pressed


3. Method

This method is an interface of Tkinter to the tcl interpreter. Image used in example [i] & example [ii]-

[i] Basic Usage Example

This example represents the use of chúng tôi method.


import tkinter as tk program = tk.Tk() program.title(' method basic example')'wm', 'iconphoto', program._w, tk.PhotoImage(file='C:/Users/afu/Desktop/tk/dino.png')) program.mainloop()


 [ii] Advance Usage Example


import tkinter as tk from tkinter import Tk from tkinter import Frame from tkinter import Label from tkinter import SUNKEN, LEFT from tkinter import FLAT, BOTH from tkinter import RIDGE, RAISED from tkinter import GROOVE program = tk.Tk()'wm', 'iconphoto', program._w, tk.PhotoImage(file='C:/Users/afu/Desktop/tk/dino.png')) class Icon(Frame): def __init__(code): super().__init__() code.UI() def UI(code): code.master.title("Advance usage example") code.pack(fill=BOTH) framedesign = Frame(code, borderwidth=10) framedesign.pack() label1 = Label(framedesign, width=20, bg='#02FAFE', height=15, relief=GROOVE) label1.pack(padx=5, side=LEFT) label2 = Label(framedesign, bd=4, bg='#16DFE2', width=10,height=15, relief=GROOVE) label2.pack(padx = 5, side=LEFT) label3 = Label(framedesign, bd=4, bg='#28A6A8', width=20,height=15, relief=FLAT) label3.pack(padx=5,side=LEFT) label4 = Label(framedesign, bd=2, bg='#2A7778', width=10, height=15, relief=RAISED) label4.pack(padx = 5, side=LEFT) label5 = Label(framedesign, bd=3, bg='#173232', width=20, height=15, relief=RIDGE) label5.pack(padx=5,side=LEFT) code.pack() app = Icon() program.mainloop()



On the basis of the above example, an individual can understand how to set up images as a window’s icon. The different methods and examples describe the process of setting up images as an icon in different ways and also briefly introduce the different aspects of creating a GUI using Tkinter.

Recommended Articles

We hope that this EDUCBA information on “Tkinter Icon” was beneficial to you. You can view EDUCBA’s recommended articles for more information.

Definition And Syntax With Examples

Definition of MySQL AES_Encrypt

The MySQL AES_Encrypt function implements the AES algorithm to encode a provided string as arguments. The AES algorithm, which stands for Advanced Encryption Standard, encrypts the data using a key length of 128 bits, extendable up to 256 bits. MySQL AES_Encrypt() encodes a specific string and produces a binary series. If the argument provided to the function is NULL, the output will also be NULL.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

We, a user, provide too small a key length. It may be null-padded, i.e., due to the memset, but if it’s too big, then it may xor the additional bytes using the first key_size bytes; suppose when the critical size will be 4bytes along with the key as 12345678, then it will be xor to 5678 using the outcome as the key with 1234. Therefore, for the best security, we must implement a random key length of the size configured AES to be used. Hence, for providing AES-128, we need a 128-bit as a random key or 32 hex characters.

Syntax of MySQL AES_Encrypt AES_ENCRYPT (Encryp_String, Key_String);

The function named Encryp_String describes the arguments mentioned above, which are Encryp_String and Key_String.

Encryp_String:  This string will be encrypted.

Key_String: This is the key string to encrypt the first argument String.

These input arguments can be of any length. If any of these arguments, such as the key value or the string to be encrypted, are NULL, the function will return NULL. AES is an algorithm that operates at the block level, where padding encodes strings of irregular lengths. The resulting length of the string can be calculated using the following formula:

16 * (trunc(str_len/16) + 1);              

AES is a two-way encryption and decryption mechanism that provides security for sensitive data records while allowing the original data to be retrieved. The AES algorithm utilizes an encryption key as a seed to achieve this. AES implements a compound mathematical algorithm comprising two concepts: confusion and diffusion. Here, the confusion process helps to hide the relationship between the original data and the encrypted data result. In contrast, the Diffusion process functions to shift, alter or adjust the data compositely.

When executed, the function AES_ENCRYPT() in MySQL will return the value, which is a binary string, after converting the original plaintext. The MySQL AES_ENCRYPT() function supports MySQL versions 5.7, 5.6, 5.5, 5.1, 5.0, and 4.1.

How does AES_ENCRYPT Function Work in MySQL?

AES_ENCRYPT() function in MySQL applies encryption of data records by using the official AES algorithm, formerly recognized as ‘Rijndael’, where the AES standard allows several key lengths. The default key length is 128 bits, but 196 and 256 bits can also be implemented as described. The key length in AES is a trade-off between safety and performance.

Let us view the code example to show the working of the AES_Encrypt() function as below:

SELECT AES_Encrypt('mysqlcoding','mysqlkeystring');

The above MySQL query statement encodes the string specified like ‘mysqlcoding’ with the key mysqlkeystring. The output for this will be the following after execution:

AES_Encrypt() allows the regulator of the block encryption mode and will receive init_vector as an optional initialization vector argument where:

This system variable block_encryption_mode governs the mode for the server’s block-based encryption algorithms whose value is aes-128-ecb by default, indicating encryption using a key length of 128 bits and mode ECB.

The optional argument init_vector delivers an initialization vector for this block encryption mode, which needs it.

Modes that require the init_vector argument should have a length of 16 or more bytes, with any bytes beyond 16 being ignored. But an error will take place if init_vector is missing. So we can write as follows:

SELECT AES_ENCRYPT (Encryp_String, Key_String, @init_vector);

But the modes that do not need the optional argument init_vector will be disregarded, and an associated warning is produced if it is stated.

To use an initialization vector (IV), a random string of bytes can be generated by invoking RANDOM_BYTES(16). When the encryption mode requires an IV, you should consistently use the generated vector for the encryption and decryption of any string.

Certainly! Below is a table list that explains various allowed block encryption modes along with the associated initialization vector (IV) argument required:

Block Encryption Mode  Initialization Vector Needed



CFB1 Yes

CFB8 Yes

CFB128 Yes


Examples of MySQL AES_Encrypt

Let us illustrate some examples to show the MySQL AES_Encrypt() function works as follows:

1. Executing AES_Encrypt() function on a string by SELECT statement:


The MySQL AES_Encrypt() uses the SELECT statement to find the outcome and encrypt the string in the MySQL server.


2. Executing AES_Encrypt() function on a bigger string by SELECT statement:

SELECT AES_ENCRYPT('MySQLdatabasefunction','key');




4. Executing AES_Encrypt() function implementing a sample table in the database:

INSERT INTO demo VALUE (AES_ENCRYPT('mystring','key'));

If explained in the above query, the function encrypts the particular string mystring with a key and enters the encrypted string as output into the table ‘demo’.

5. Executing AES_ENCRYPT() function with key value:

SELECT AES_ENCRYPT('All is Well','Google');


The AES_ENCRYPT() function accepts the key value “Google” and the string to be encrypted, “All is Well,” as arguments.


The MySQL AES_ENCRYPT() function is considered insecure because it defaults to using ECB mode unless configured otherwise.

Depending on what the server’s block_encryption_mode a user configures, we can use the key length from the list of supported ones, such as 128, 256, and 192, where the AES standard algorithm also permits these key lengths.

Recommended Articles

We hope that this EDUCBA information on “MySQL AES_Encrypt” was beneficial to you. You can view EDUCBA’s recommended articles for more information.

Constructors, Methods, Class & Examples

Introduction to Java LinkedHashMap

In Java, LinkedHashMap is an implementation of linkedlist from the interface Map. It is similar to HashMap, where an extra feature is included that maintains the order of elements that are being inserted into it. Even though HashMap provides quick insertion, deletion, and search, element insertion order is not maintained.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

Features of Java LinkedHashMap

In addition to that, several other features are also included in LinkedHashMap.

It consists of unique elements only.

It can contain a single null key and several null values.

Insertion order is maintained.

Extends HashMap class.

Values present are based on the key.

Non synchronized.

16 is the initial default capacity

The load factor is 0.75.

Here, obj is the object of the created LinkedHashMap.

Once the LinkedHashMap object is created, it will be used for adding elements to the map, as shown below.

obj.put(11, "Victor"); obj.put(33, "Shyla"); obj.put(14, "Nancy"); obj.put(100, "Kuffi"); obj.put(23, "Princy"); obj.put(37, "Chamm"); Constructors

Given below are the constructors of a LinkedHashMap:

1. LinkedHashMap(): An empty LinkedHashMap instance will be created with the ordering based on insertion, load factor 0.75 and default initial capacity as 16.

2. LinkedHashMap(int initialCapacity): An empty LinkedHashMap instance will be created with the ordering based on insertion, load factor 0.75 and specified initial capacity.

3. LinkedHashMap(int initialCapacity, float loadFactor): An empty LinkedHashMap instance will be created with the ordering based on insertion, specified load factor, and initial capacity.

4. LinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder): An empty LinkedHashMap instance will be created with specified load factor, access order and initial capacity.


The following are the commonly used methods in LinkedHashMap.

1. clear(): Every mapping from the map will be removed.

2. boolean containsKey(Object key): If the map contains a mapping to one or more than one key of the value mentioned, true will be returned.

3. boolean containsValue(Object key): If the map contains a mapping to a minimum of one key, true will be returned.

4. Object get(Object key): The value of the mentioned key’s mapping will be returned.

5. isEmpty(): If there are no key-value pair mappings, true will be returned.

7. Object remove(Object key): The value of the mentioned key’s mapping will be removed.

Examples of Java LinkedHashMap

Given below are the examples of Java LinkedHashMap:

Example #1

Java program to create a simple LinkedHashMap.


import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; public class LinkedHashMapExample { public static void main(String args[]) { obj.put(11, "Anna"); obj.put(33, "Adam"); obj.put(14, "Iza"); obj.put(23, "Norah"); obj.put(100, "Denan"); Iterator itr = s.iterator(); while(itr.hasNext()) { Map.Entry mp = (Map.Entry); System.out.print("Key in the LinkedHashMap is : "+ mp.getKey() + " and it's corresponding value is: "+mp.getValue()+" n"); } } }


Example #2

Java program to remove key-value pair from the map.

import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; public class LinkedHashMapExample { public static void main(String args[]) { obj.put(11, "Victor"); obj.put(33, "Shyla"); obj.put(14, "Nancy"); obj.put(100, "Kuffi"); obj.put(23, "Princy"); obj.put(37, "Chamm"); System.out.print("Before removal, LinkedHashMap is: "+obj+"n"); obj.remove(100); obj.remove(37); System.out.print("After removal, LinkedHashMap is: "+obj); } }


In this program, also, a LinkedHashMap is created first. After that, elements are added to it with key-value pairs. Once it is completed, LinkedHashMap is printed. Then, two key-value pairs are removed from the map using the method remove(). After that, once again, the map is printed and displayed as shown in the sample output.

Example #3

Java program to print key-value pairs in the map on the basis of access order.


import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; public class LinkedHashMapExample { public static void main(String args[]) { obj.put(11, "Victor"); obj.put(33, "Shyla"); obj.put(14, "Nancy"); obj.put(100, "Kuffi"); obj.put(23, "Princy"); obj.put(37, "Chamm"); obj.get(33); obj.get(11); System.out.print("LinkedHashMap with access order is: "+obj); } }


Here, in this program also, a LinkedHashMap is created first. After that, elements are added to it with key-value pairs. Once it is completed, the elements with keys 33 and 11 are accessed. Then, the map is printed and displayed as shown in the sample output. It can be seen that the elements that are accessed are at the end of the map.


Almost all details on Java LinkedHashMap, such as syntax, constructors, methods, and examples, are explored in this article in detail. Moreover, it also identifies the main difference between LinkedHashMap and HashMap.

Recommended Articles

This is a guide to Java LinkedHashMap. Here we discuss the introduction, constructors, methods, and examples. You may also have a look at the following articles to learn more –

Uninterruptible Power Supply (Ups) � � Definition Block Diagram Types And Applications

In this article, we will discuss the uninterruptible power supply (UPS), its block diagram, types, and applications. So, lets’ begin with the basic definition of the uninterrupted power supply (UPS).

What is a UPS?

UPS stands for Uninterruptible Power Supply. An Uninterruptible Power Supply (UPS) is the case of a main power supply failure. A UPS or uninterruptible power supply uses batteries and supercapacitors to store electrical energy and delivers this stored electrical energy when the main input power supply fails. However, a typical UPS battery can supply electrical power for a short duration. Hence, UPSs are mostly used as short run time backup power sensitive equipment such as computers, data centers, TV sets, industrial process control and monitoring systems, and many other electronic devices.

A UPS is commonly used with computers that keep running a computer for a short time, about 15 to 30 minutes, after the failure of supply mains. Therefore, it prevents the sudden turn off of the computer and loss of data in the system, and other system failures. These days, there are several types of UPS systems available in the market. Some smart UPS systems are also available that come with software components that enables us to automate the switching function of the backup supply when we are away from the computer system.

Major Parts of an UPS

Following are the main components of a UPS system −

Battery − The battery works as the energy storage unit in the UPS system. It provides the stored electrical energy for a sufficient amount of time during main power failure.

Rectifier or Charger Circuit − It converts the supply voltage of 240 VAC into 12 V (or any other battery voltage) DC. It supplies this rectified DC power to the battery for storage.

Inverter − It converts the DC output power of the battery into ac power to supply the load during mains power failure.

Static Switch − It is a semiconductor device such as a thyristor which transfers the load from the utility to the inverter (and the inverter to the utility) without any interruption in the power supply to the load.

Primary Function of a UPS

When there is any failure in the main power supply from the utility, the UPS supplies emergency power to the load for a short duration of time. This is the primary function of a UPS. Modern UPSs can also provide protection against electrical faults such as short-circuit, voltage fluctuations, low voltage, instability of mains frequency, etc.

Types of UPS

The uninterrupted power supply (UPS) systems are broadly classified into the following three types −

Off-Line UPS

On-Line UPS

Line Interactive UPS

Now, let us discuss each of these three types of UPS systems individually along with their block diagrams.

Off-Line UPS

The Off-Line UPS is also known as Standby UPS. This type of UPS system gives only the most basic features. In the case of off-line UPS, the system will start operating only when there is a power failure in the supply mains. The block diagram of the off-line UPS is shown in Figure-1.

In an off-line UPS system, the ac power from the supply mains is first converted into DC power using a rectifier circuit and then stored in the battery connected to the output port of the rectifier. When, there is any power failure that occurs in the supply mains, the dc power of the battery is converted into ac power using a power inverter and is then transferred to the load connected to the ups system. The off-line ups systems provide surge protection in addition to the emergency power. These are the least expensive UPS systems available in the market.

On-Line UPS

The On-Line UPS system uses a double conversion method. That means, in this UPS system, the input AC power is first converted into DC power by a rectifier to charge the UPS battery, and then this DC power is converted back into AC power by a power inverter to power the load equipment. Therefore, the On-Line UPS systems are commonly used in such systems where electrical isolation is required between the input and output. The block diagram of a typical On-Line UPS system is shown in Figure-2.

In this system, the rectifier circuit receives ac power from the supply mains and directly drives the inverter circuit. Thus, it involves two simultaneous conversion processes and is hence referred to as a Double Conversion UPS System.

In the case of supply mains power failure, the rectifier circuit becomes inactive and the DC power stored in the battery is converted into AC by the inverter and supplied to the load. Once the mains power is restored, the rectifier circuit again starts charging the battery. A current limiting mechanism is also provided in the system to protect the battery from overheating. Although, on-line ups systems are slightly expensive due to their design and components used.

Line Interactive UPS

The Line-Interactive UPS systems are connected in parallel with the AC mains in a standby configuration so that these systems can interact with the AC input system. These types of UPS systems are mainly used in small businesses and offices. The block diagram of a line interactive UPS system is shown in Figure-3.

Under normal operating conditions, the load is supplied with AC power through a parallel connection of the AC source and the bidirectional converter. The converter charges the battery, and also provides AC power to the load in the situation of breakage of supply mains. In this type of UPS system, a bypass is also provided which transfers the load to a bypass AC input when the UPS fails to function. The line-interactive UPS systems are well suited for

Applications of UPS

These days, UPS systems are very common in almost all electrical and electronic systems. Following are some of the important applications of different types of UPS systems −

UPS systems are used in computer data centers.

UPS systems are used in industrial control and monitoring systems.

UPS systems are also used in telecommunication systems.

They are also used in hospitals, banks, insurance offices, and other commercial applications for backup power, etc.


From the above discussion, it may be concluded that the UPS is an electrical device used to provide emergency electrical power under the failure of supply mains. Modern UPS systems are also able to provide several types of protection such as short circuit, low voltage, voltage fluctuation, frequency variation, etc.

Based on the design and operation, the UPS systems are classified into three main types namely off-line UPS, on-line UPS, and line-interactive UPS. UPS systems are widely used in computer systems, houses, businesses, and industries as backup power supply systems.

Update the detailed information about Circular Flow Of Income: Definition, Examples, Types, Methods on the website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!