हिंदी

Write about the declaration of Variables in JAVA.

Advertisements

प्रश्न

Write about the declaration of Variables in JAVA.

लघु उत्तरीय
Advertisements

उत्तर

In Java, declaration of variables refers to the process of specifying the data type and name of a variable before using it in a program. The data type determines the type of value that can be stored in the variable.

Syntax:

dataType variableName;

Example:

int age;

Here, int is the data type and age is the variable name. This statement declares a variable named age that can store integer values.

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Variables and Expressions - EXERCISE [पृष्ठ १३१]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×