DIFFERENCE BETWEEN FUNCTION AND METHOD IN JAVA PART . 3
FUNCTION AND METHOD
If a function is defined with in a class then it becomes as method. And without class it is called as function.
Package :- It ia collection of predefined classes ans interface.
1 – Class Name :- 1st letter should be capital letter.
E.x :- Test, Sample, String, String Buffer.
2 -Method Name or Function Name 1st letter small if using single word.
E.x :- delhi(), agra(), …………
The naming convention is called as camel case in java.
Java uses camel case as a practice for writing names of methods, variables, classes, packages and constants.
Naming conventions (Pascal conventions & camel case)
Pascal conventions :- For classes we use Pascal convention. First and subjacent character from a word are capital letters(Uppercase).
Ex. = Main, My Scanner, My Name.
camel case :- For function and variables, we use camel case convention. Here first character is (lowercase) and the subjacent character are uppercase.
Ex = main, my Scanner, my Name.
AddTwoNumber a Pascal naming convention.
addTwoNumber a camel case naming convention.
CORE REQUIREMENTS TO RUN JAVA PROGRAM IN OUR SYSTEM
Now Friends If you like this post please tell us how can we help you to provide better knowledge?
If this post is use full for you please share the post with your friends.
Please follow as facebook : www.facebook.com
Please follow as twitter : www.twitter.com
And more information please visit here : www.weindians.in
Please Subscribe on youtube : www.youtube.com