Science, Tech, Math › Computer Science What Is a Java Statement? Express, declare and redirect Share Flipboard Email Print Klaus Vedfelt/Taxi/Getty Images Computer Science Java Programming PHP Programming Perl Python Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More By Paul Leahy Paul Leahy Computer Science Expert M.A., Advanced Information Systems, University of Glasgow Paul Leahy is a computer programmer with over a decade of experience working in the IT industry, as both an in-house and vendor-based developer. Learn about our Editorial Process Updated on June 14, 2018 Statements are similar to sentences in the English language. A sentence forms a complete idea which can include one or more clauses. Likewise, a statement in Java forms a complete command to be executed and can include one or more expressions. In simpler terms, a Java statement is just an instruction that explains what should happen. Types of Java Statements Java supports three different types of statements: Expression statements change values of variables, call methods, and create objects. Declaration statements declare variables. Control-flow statements determine the order that statements are executed. Typically, Java statements parse from the top to the bottom of the program. However, with control-flow statements, that order can be interrupted to implement branching or looping so that the Java program can run particular sections of code based on certain conditions. Examples of Java Statements //declaration statement int number; //expression statement number = 4; //control flow statement if (number < 10 ) { //expression statement System.out.println(number + " is less than ten"); } Cite this Article Format mla apa chicago Your Citation Leahy, Paul. "What Is a Java Statement?" ThoughtCo, Feb. 16, 2021, thoughtco.com/statement-2034294. Leahy, Paul. (2021, February 16). What Is a Java Statement? Retrieved from https://www.thoughtco.com/statement-2034294 Leahy, Paul. "What Is a Java Statement?" ThoughtCo. https://www.thoughtco.com/statement-2034294 (accessed April 1, 2023). copy citation