Lesson 4 of 34
Operators: ಲೆಕ್ಕಾಚಾರ
8 min 20 XP
Java ದಲ್ಲಿ + - * / % operators ಇವೆ. ಎಚ್ಚರ: ಎರಡು ints ಅನ್ನು / ನಿಂದ ಭಾಗಿಸಿದರೆ ಪೂರ್ಣಾಂಕ ಸಿಗುತ್ತದೆ, ದಶಮಾಂಶ ಭಾಗ ಹೋಗುತ್ತದೆ. % ಶೇಷವನ್ನು ಕೊಡುತ್ತದೆ.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.ದಶಮಾಂಶ ಉತ್ತರ ಬೇಕಾದರೆ (double) ನಿಂದ cast ಮಾಡಿ. x += 5 ಎಂಬುದು x = x + 5 ರ ಸಂಕ್ಷಿಪ್ತ ರೂಪ. x++ ಒಂದು ಕೂಡಿಸುತ್ತದೆ, x-- ಒಂದು ಕಳೆಯುತ್ತದೆ.
Example: edit me and press Run
Output Loading Java (first time takes a few seconds)
Press Run to see the result here.printf("%.2f%n", value) ಎರಡು ದಶಮಾಂಶ ಸ್ಥಾನಗಳೊಂದಿಗೆ ಮುದ್ರಿಸುತ್ತದೆ. %n ಎಂದರೆ ಹೊಸ ಸಾಲು.