JAVA
* Java is a general purpose programming language.
* It is designed by james gesting at Sun Micro System and released in 1995 as a core component.
*The latest version is Java 12.0 which is released on march 2019.
*Sun Micro System realeased at fast public implementation as JAVA 1.0 is 1996.
* It promised wright one runs everywhere (WORA).
VERSIONS OF JAVA
Above list is all about the versions of java till date.
/* Hello world in java */
class helloworld
{
public static void main()
{
System.out.println("hello world");
}
}
Above program is a Sample how to write a program.
- The first line (/* Hello world in java */).Starting with /* and ending with */ is multi line comment which will not compile during execution of the program.Those lines/comment are not compulsury.
- Multiline comment ------ (/*.....................*/).
- Singleline comment -------(//................).
- The KEYWORDS "public" denotes that a method can be called from code in other classes or that a class may be used by classes outside the class hierarchy (The class hierarchy is related to the name of dictionary in which the Java files is located). This is called double modiefier include the keywords "privvate" and "protected"
- The KEYWORDS "static" infront of method indicated a static method which is assiociated only with the class not with any instance of that class static method cannot access any class member that not also static method that are not designed static are instance method and required a specific instance of class to operate.
- The KEYWORDS "void" indicate that the main method does not returns any values to the color.
- The method name "main" is not a keyword in java language.It is simply the name of the method the java launcher caused to pass control to the program A java program may contain multiple classes that name "main" method which means that (VM) need to be explitly told which class to launch when. The "main" method must accept an array of "string" object by convertion it is required as "args".
- Printing is part of a java standard library the "System" class define a public static field called "out".the out object is an instance of the print stream class and previous many method or printing data to standard out including "println" string.Which also happen a new line to the past string.
- The string "hello world " is automatically converted to a string object by the compiler.
" THANK YOU FOR VISITING
OUR
SECOND POST AND PLEASE COME BACK
IN OUR NEXT UPDATE IN THIS BLOG"
0 Comments