ඔන්න පොරොන්දු වුනා වගේම Data Types ගැන පාඩම අද ඉදිරිපත් කරනවා. Data types කියන්නේ මොනවද කියල විස්තර කරන්න කලින් මෙන්න මේ පොඩි ප්රෝග්රෑම් එක ක්රියාත්මක කරලා බලන්න. මේ code එක Notepad එකට copy කරලා, මම කියල දුන්නු විදියට cmd එකෙන් compile කරලා run කරලා බලන්න. class Test{ public static void main(String args[]){ byte b = 10; short s = 20; int i = 30; long l = 40; double d = 34.5; float f = 55.456f; char c = 'x'; boolean bool = true; System.out.println(b); System.out.println(s); System.out.println(i); System.out.println(l); System.out.println(d); System.out.println(f); System.out.println(c); System.out.println(bool); } } මේ code එක run කලාම පහත දැක්වෙන විදියේ ප්රතිපලයක් ලැබේවි. වැඩසටහනේ අන්තිම පේලි...
Learn Java Programming From The Begining. Free Sinhala Java Tutorials And Lessons.