Zero to FAANG (Day Sixth)--Java atanomy
I learnt Java program structure.
Package com. Company this is first line in Java. It shows everything below this that will be stored in package directory file.
Public class main() this line has three things. First one is access modifier which is public. Public used to show that this thing can be used from anywhere that is why it is public. Second one is class. Class is group of functions. Third one is main. Main is object of class. Object means, it will used for calling class.
Public static void main(string[] args). This is entry point of the program. Static means, it will assure that this function cannot use from anywhere. But it still in use. Second one is void. Void is showing that this function will not gives any return value. Third one is string. This is a array and next one is argument.
System. Out. Println("Ram Ram");
This line is our code.
Another thing I learnt. Which is naming conventions.
Whenever we use classes. It must be have a name right!. So make must be start with a capital letter it is called as Pascal naming convention.for example--SahilSanjayKadam.
When we uses function. We must write it's name with small letter. It is known as camel case naming conventions. For example--sahilSanjayKadam.
So,i learnt all this things. Thanks