Lesson 2 of 34
Variables மற்றும் Data Types
8 min 20 XP
Java-ல் ஒரு variable உருவாக்கும்போது அதன் type-ஐ முதலில் சொல்ல வேண்டும். int முழு எண்களுக்கு, double தசம எண்களுக்கு, boolean true/false-க்கு, char ஒரு எழுத்துக்கு, String text-க்கு.
Example: edit me and press Run
Press Run to see the result here.String-உடன் + சேர்த்தால் அவை ஒன்றாக இணையும் (concatenation). Variable-ன் மதிப்பை பின்னர் மாற்றலாம், ஆனால் type மாறாது. char-க்கு single quotes ' ', String-க்கு double quotes " ".
Example: edit me and press Run
Press Run to see the result here.final என்று போட்டால் அந்த variable-ஐ மீண்டும் மாற்ற முடியாது (constant). Constant பெயர்களை CAPITAL எழுத்துகளில் எழுதுவது வழக்கம்.