I got some basic ideas on the functions, classes and methods used in java. The next step which I need to learn further are the types of functions and classes used in the program, the purpose of using them, program execution and various java editions.
To access a method of a particular class, we need a dot operator. This can be explained with the help of a statement.
system.out.println(“ hi “);
The statement given above is to display the word “hi” as output. The function used to print the output is “println”. This function will be a part of a class. And the class in which the function “println” belongs is the “system” class. To be more precise “println” is the method of the class “system”. So to access a particular function we need to specify the class in which the function belongs with the help of a dot operator. Also each statement in java should end with semicolon.
A program before execution have to undergo through a process called compilation. During the process of compilation, the java compiler converts the program to byte code. The conversion of program to byte code has a major advantage. This code is platform independent. That is the program can be run in windows, linux or mac if it is converted to byte code. Each operating system has got their own java run time environment where it converts the byte code to a native code accessible to that particular OS. I think this is the main reason for the world wide acceptance that java as a programming language received and is still receiving. Few other languages like ‘python’ and ‘C#’ also possess the same feature. In java the byte code is converted to native code using Java Virtuous Cycle(JVC).
Java as a programming language has got basically four editions.
- Standard Edition(SE)
Standard edition consists of almost all basic libraries that a java developer should know.
2. Enterprise Edition(EE)
This edition is used in large systems where some advanced libraries in addition to the basic are included.
3. Micro edition(ME)
Micro edition is mainly used for programming in mobile devices. It is actually a subset of Standard edition where only some libraries specific to mobile devices are only included.
4. Java Card
Java card is used for programming in smart cards.