What is Flowchart in Java?

Table of Contents

Java code specification This java code specification is based on sun’s standard java code specification. To meet the actual needs of our company, some modifications may be made. For places not explained in this document, please refer to the sun java standard code specification. If there is a conflict between the two sides, the sun java standard shall prevail. 1. Identifier naming convention 1.1 Overview Identifier naming strives to be uniform, expressive and concise. 1.1.1 Unification means that for the same concept.

The entire process of Java code compilation and execution

The java source code compiler does the java code compilation; the flow chart is as follows: The JVM execution engine executes Java byte code; the flow chart is as follows:? The process of java code compilation and execution includes The following three essential mechanisms: Java source code compilation mechanism class loading mechanism class execution mechanism java source code compilation consists of the following three processes: analysis and input to the symbol table, annotation processing, semantic analysis, and generation.

Java Implement dichotomy search.

Java code implementation: public class test{ public static void main(string arr ={81,51,88,15,59,20,1,50,66,77,4}; Sort arrays in ascending order .sort(arr); print array system.out.println(arrays.tostring(arr)); print search result system.out.println(binarysearch(arr,59));} public static int binarysearch(int)…

What is flowchart in Java
What is flowchart in Java

What is Flowchart in programming?  

A program flowchart, also known as a program block diagram, is a graphical representation that uses uniformly prescribed standard symbols to describe the specific steps of program operation. The program block diagram’s design is based on the processing flowchart; through the detailed analysis of the input and output data and the processing process, the main operating steps and content of the computer are identified. The block diagram is the essential basis for program design, so its quality is directly related to programming design quality.


The program flow chart is an illustration that uses prescribed symbols to describe various operations or judgments required in a particular program. This flow chart emphasizes the logic and processing sequence of the program and explicitly describes the computer’s logic and steps to solve the problem. When there are many loop statements and transfer statements in the program, the program’s structure will be more complicated, which will cause difficulties in program design and reading. The program flow chart draws the program flow in the form of a graph. It is a graphical representation of the algorithm, which is intuitive, straightforward, and easier to understand.

The program flow chart comprises processing boxes, judgment boxes, start and end boxes, connection points, flow lines, comment boxes, etc., and combined with corresponding algorithms, constitute the entire program flow chart.

The processing box has a processing function; the judgment box (diamond box) has a conditional judgment function, with one entry and two exits; the start-stop box represents the beginning or end of the program; the connection point can connect the process lines; the process line (represents the path of the process) And direction; the comment box is for the necessary supplementary explanation of the operation of some boxes in the Flowchart.

Basic structure

Any complex algorithm can be composed of three basic structures: sequence structure, selection (branch) structure, and cyclic structure. Therefore, only these three primary structures are used as “building units,” and the three primary structures are observed when constructing an algorithm. This kind of basic structure specification, basic structures can be juxtaposed, can contain each other, but they are not allowed to cross, and they are not allowed to go directly from one structure to another. Precisely because the entire algorithm comprises three primary structures, just like built with modules, the structure is straightforward, easy to verify correctness, and easy to correct errors. This method is a structured method. The programming that follows this method is structured programming. Correspondingly, as long as the Flowchart drawing method of the three basic structures is specified, the Flowchart of any algorithm can be drawn.

Sequence structure

The sequence structure is a simple linear structure, and the boxes are executed in sequence. The basic form of the flow chart is shown in Figure “Sequence Structure,” the execution order of sentences is A→B→C.

Selection (branch) structure

This structure judges a given condition and executes different box contents when the condition is true or false. There are two basic shapes.

Loop structure

There are two necessary forms of loop structure: while loop and do-while loop. a. While loop: its execution sequence is: when the condition is real, execute A repeatedly, once the condition is false, jump out of the loop and execute the statement immediately after the loop. b. do-while type loop: The execution sequence is: first execute A, then judge the condition, when the condition is real, execute A in a loop, once the condition is false, end the loop and execute the next statement immediately after the loop.

Functions and advantages

A program flow chart describes people’s methods, ideas, or algorithms to solve problems.

1. Advantages of flow chart:

(A) Use standardized and straightforward symbols, and the drawing method is simple;

(B) Clear structure and strong logic;

(C) It is easy to describe and understand2. Symbols used in the Flowchart

Symbols used in the Flowchart

Symbols used in the Flowchart


(1) The arrow indicates the control flow

(2) The rectangle represents the processing steps

(3) Diamonds represent logical conditions

Case Analysis

The problem of calculating the area of ​​a rectangle:

It can be divided into the following steps:

  • Set two variables num1 and num2, receive the length and width input by the user, and store them in two variables num1 and num2;
  • Determine whether num1 and num2 are more significant than 0. If they are greater than 0, continue to the next step. Otherwise, the user will be prompted to enter the length and width incorrectly, and the algorithm ends;
  • Calculate the product of num1 and num2, and store the result of the product in the result variable;
  • Display the value of the result variable to the screen.

The calculation flow chart is shown in “Case”:

What Is Flowchart in programming in Java?

In real life, we have to face various choices every day. There is a saying that “choices are more important than hard work, “and the results of different choices vary greatly. The same is true for the code written in the program. The relational and logical operators we learned in the last article can make the program perform different choices.

Joint flow control statements in programs in this paragraph.

“Java Syntax | Control Statements and Flow Charts.”

“Java syntax | if selection structure.”

“Java syntax | switch selection structure.”


In the previous studies, we also wrote a few code lines, and we also understood that the code we wrote was executed sequentially from top to bottom, and if we wrote a few lines, we would execute a few lines from top to bottom. This “one bar” code is called sequential control statements.

Sequence control statement

Sequence control statements are the most straightforward flow control in a program. They are executed in sequence according to the sequence of code execution. Most of the codes in the program are executed in this way.

Select-control statement

In this article, we choose to learn the structure that belongs to the select control statements. The selection control statement is also called the branch structure statement. The logical operations results have two or more (true or false), so the selection is generated. Different codes will be executed according to different choices.

Loop control statement

Loop control statements can execute a specific piece of code repeatedly when the loop conditions are met. This piece of code that is repeatedly executed is called a loop body statement (loop operation). When this loop body is executed repeatedly, it is necessary to modify the loop judgment condition to false when appropriate to end the loop. Otherwise, the loop will continue to execute, forming an endless loop.

Flow chart

A flowchart is an image representation of processes, algorithms, and processes and is widely used in technical design, communication, and business briefings. Usually, use some diagram boxes to represent various types of operations, write each step in the box, and then connect them with arrows to indicate the execution order. Graphical representation of the algorithm is intuitive and easy to understand. They are sometimes called input-output diagram. As the name suggests, it is used to describe the specific steps of a work process intuitively. This process can be either a process flow on a production line or a management process necessary to complete a task.

A concise flow chart can promote the communication between product managers, designers, and developers and help us find out and fill in the gaps, avoid omissions in functional processes and logic, and ensure the integrity of the process. The flow chart can make the thinking clearer and the logic clearer, help the program’s logical realization, and effectively solve practical problems.

Generally, for anyone who wants to create a process, a flowchart is useful no matter what the process is for. It can help you:

  • Design the interaction process of your product
  • Ensure that your product is friendly at all times (even when failures that you never considered before occur)
  • Help you integrate scattered wireframes
  • To help you communicate with colleagues from different backgrounds: such as guiding engineers to develop


To facilitate identification, the customary practice of drawing a flowchart is:

Rounded rectangle: indicates the beginning and end

Rectangle: indicates the operation steps used for standard work

Diamond: Represents the problem judgment (review/approval/review) link

Parallelogram: Represents input and output

Arrow: represents the workflow direction


When drawing a flow chart, to improve the flow chart’s logic, it should be arranged from left to right and top to bottom, and each element can be marked with Arabic numerals.

Start with the start character and end with the end character. The start symbol can only appear once, and the end symbol can appear multiple times. If the process is straightforward enough, the start and end symbols can be omitted.

When each step has a choice or decision result, it needs to be carefully checked to avoid loopholes, which may cause the process to fail to form a closed loop.

The processing symbol should be a single entry and a single exit.

Do not cross the connecting wires.

If there are two indicating arrows under the same path, there should be only one.

The symbol size of the same Flowchart needs to be consistent.

The processing is parallel and can be placed at the same height.

Labels should be used when necessary to illustrate the process clearly.

In the Flowchart, if there is a reference to other defined processes, there is no need to repeat the drawing. Just use the defined process symbols.


A flowchart is a sort of graph that speaks to a calculation, work process, or cycle. The flowchart shows the means as boxes of different sorts and their request by interfacing the crates with bolts. This diagrammatic portrayal represents an answer model to a given issue. Flowcharts are utilized in examining, planning, archiving, or dealing with a cycle or program in different fields.

Java is a platform that offers excellent possibilities for the development of applications and the work of graphical interfaces. · The functions and source code in general used in this program is simple for other users to understand and modify if necessary. · It is a simple program and has an excellent graphical interface that is very friendly for those who will use it.

The making of flowcharts and procedures manuals and facilitating the work of new servers or relocated servers allow for better organization, segregation of functions, critical analysis of activities, and administrative speed. Administrative and finalist structures with the detailed flow of activities and procedures manuals are essential for the professionalization of public administration and corporate governance.

It should be noted that these manuals and flowcharts complement and detail but are not to be confused with the attributions of the administrative sectors determined by ordinances or internal regulations.

Even for the allocation of servers within the agency, it is necessary to check the routine workflow through flowcharts.

Luis Gillman
Luis Gillman

Hi, I Am Luis Gillman CA (SA), ACMA
I am a Chartered Accountant (SA) and CIMA (SA) and author of Due Diligence: A strategic and Financial Approach.

The book was published by Lexis Nexis on 2001. In 2010, I wrote the second edition. Much of this website is derived from these two books.

In addition I have published an article entitled the Link Between Due Diligence and Valautions.

Disclaimer: Whilst every effort has been made to ensure that the information published on this website is accurate, the author and owners of this website take no responsibility  for any loss or damage suffered as a result of relience upon the information contained therein.  Furthermore the bulk of the information is derived from information in 2018 and use therefore is at your on risk. In addition you should consult professional advice if required.