ජාවා with නානා(part 6)

Share

කට්ටිය පොඩ්ඩක් සමාවෙන්න 6 වෙනි ටියුටොරියල් එක ලියන්න ප්‍රමාද උනාට.
වැඩි කථා නැතුව එහෙනන් කෙලින්ම වැඩේට බහිමු. අද මම ඔයාලට කියල දෙන්නේ ඉතා………….මත්ම වැදගත් කොටසක් ජාවා වල තියන. මේකෙන්නම් හුගාක් ප්‍රශ්න අහනවා Exam එකෙදි. අද මම කියලා දෙන්නේ Fundamentals of java programming.
මේක සින්ග්ලිශ් වලින් කරන්න පොඩ්ඩක් අමාරුයි. අනික තෙරුමකුත් නෑ. එහින්දා අද පාඩම පුලුවන් තරම් කඩුව පාවිච්චි කරලා කරමු. මේ පොයින්ට්ස් හොදට මතක තියාගන්න.

 Java is an Object Oriented Programming Language
 The actual real world entities are represented by objects. Objects are instance of classes.

Classes and Objects

 Real world entities have various characteristic attributes.
E.g.:- a person has a name, age, gender etc.

 Real world entities have characteristic behaviors
E.g.:- person may walk, drink, laugh, etc.
 Similarly objects in java also have attributes and perform methods. These are defined in classes.

Statements

 A method is made up of statements.
 It cause something happen
 Ends with a semicolon (;)
 E.g.:-
System.out.println(“Charith”);

Comments is Java

 Used for reading purposes.
 Comments are not compiled or executed.
 There are 3 types of comments.

 Single line comment

E.g.:- // this is a single line comment

 Multiline Comment

E.g.:- /* this is a
Multiline
Comment
*/

 Java doc comment

• Special multiline comments.
• Use to generate java documentation using javadoc tool.
E.g.:- /**
@author Avindra
@author Ravindu
@date 2013 October 18, 2013
*/

මේකනන් අනිවා…………….. හොදටම ඔලුවේ තියාගන්න.

Literals

 Represent a value
 4 types

1) Number literals (integers and real numbers)
E.g.:- 2013, 3.142

2) Boolean literals (Logical True and False)
E.g.:- True, False

3) Character Literals(A single character)
E.g.:- ‘g’,’p’,’w’

4) String literals (A sequence of characters)
E.g.:- “FOS media roxz”

අදට මම මෙතනින් නවත්වනවා.අලුත් ටියුටොරියල් එකෙන් අද හෙටම හමුවෙමු.

මොකක් හරි අවුලක් තියනවනම්

e-mail- charith_shaddow@yahoo.com
Facebook- charith shadow Winchester (naana)
දෙකෙන් එකකට message එකක් දාන්න.