Lesson 2 of 34
Variables ಮತ್ತು Data Types
8 min 20 XP
Java ದಲ್ಲಿ variable ರಚಿಸುವಾಗ ಅದರ type ಹೇಳಬೇಕು. int ಪೂರ್ಣಾಂಕಗಳಿಗೆ, double ದಶಮಾಂಶಗಳಿಗೆ, boolean true/false ಗೆ, char ಒಂದು ಅಕ್ಷರಕ್ಕೆ ಮತ್ತು String ಪಠ್ಯಕ್ಕೆ.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.String ಜೊತೆ + ಬಳಸಿದರೆ values ಸೇರುತ್ತವೆ (concatenation). Variable ನ value ಅನ್ನು ನಂತರ ಬದಲಿಸಬಹುದು, ಆದರೆ type ಅನ್ನು ಅಲ್ಲ. char ಗೆ single quotes ' ', String ಗೆ double quotes " ".
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.Variable ಅನ್ನು final ಮಾಡಿದರೆ ಅದು ಎಂದಿಗೂ ಬದಲಾಗದು (constant). Constant ಹೆಸರುಗಳನ್ನು ಸಾಮಾನ್ಯವಾಗಿ CAPITALS ನಲ್ಲಿ ಬರೆಯುತ್ತಾರೆ.