मराठी

Explain the following: An Expression of Java

Advertisements

प्रश्न

Explain the following:

An Expression of Java

स्पष्ट करा
Advertisements

उत्तर

  • An Expression in Java is a combination of variables, constants, operators and method calls that is evaluated to produce a single value.
  • Expressions are used to perform calculations, compare values and evaluate conditions in a Java program.

Example:

int a = 10, b = 20;
int sum = a + b;

In the above example, a + b is an arithmetic expression that adds the values of a and b and produces the result 30, which is assigned to the variable sum.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Variables and Expressions - EXERCISE [पृष्ठ १३२]

APPEARS IN

धीरज मेहरोत्रा Computer Science [English] Class 12
पाठ 6 Variables and Expressions
EXERCISE | Q 34. (a) | पृष्ठ १३२
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×