TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    Java Tutorials

    Java Arithmetic Expressions

    Overview

    In this tutorial, we will learn about Java arithmetic expressions. A Java expression is a combination of operands, operators, constants, and function calls that reduces to a value.

    Types of Arithmetic Expressions

    • Integer Expressions
    • Floating point expressions
    • Mixed mode expressions

    Integer expressions

    When all the operands in the expression are of integer types such an expression is called an integer expression.

    For example:

    int x = 10;

    int y = 12;

    int result;

    result = x + y;

    Floating-point expressions

    When all the operands in the expression are of a real type such as float/double types such an expression is called a floating-point expression.

    For example:

    float x = 10.5;

    float y = 12.63;

    float result;

    result = x + y;

    Mixed mode expressions

    When some operands in the expression are integer and others of a real type such as float/double types such an expression is called a mixed mode expression.

    For example:

    float x = 12.55;

    int y = 10;

    float result;

    result = x + y;

    —

    Java Tutorials

    Java Tutorial on this website:

    https://www.testingdocs.com/java-tutorial/

    For more information on Java, visit the official website :

    https://www.oracle.com/java/

    Related Posts

    Java Performance

    Java Tutorials /

    Improving Java Performance with Multithreading

    Download Greenfoot Windows

    Java Tutorials /

    Download & Install Greenfoot on Windows

    Java Tutorials /

    Java Static Code Analysis

    Java Tutorials /

    Java Testing Tools

    Java Tutorials /

    Handle Multiple Exceptions in Java

    ‹ Java Trigonometric Functions with Examples› Declare Java variables

    Recent Posts

    • Running Tests in Parallel with Selenium Grid
    • Advanced Selenium Features
    • Locating Web Elements
    • Running the Test Script
    • Writing Your First Selenium Test Script
    • Getting Started with Selenium Automation Testing
    • Setting Up the Environment
    • How can you monitor the Quality Assurance Audit?
    • Leveraging LambdaTest with Appium 2.0
    • Appium 2.0 Plugins ListAppium 2.0 Plugins
    • Touch Actions and Multi-Touch Actions
    • Changes in Drivers and Classes
    • Appium Inspector
    • Capabilities in Appium 2.0
    • Appium 2.0 Driver ListAppium 2.0 Driver Installation & Management
    CyberLink Multimedia Software

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com