Académique Documents
Professionnel Documents
Culture Documents
Here in this article, it has been explained about the Java Hello World scenario
with structures and features of class and this code is written to fullfill the task
of printing Hello World from Java on the screen.
1. package sct:
It is a statement for package declaration. This definition of package statement
shows a name space in which classes is stored. Package is used to arrange the
sessions based on performance. If you bypass the package statementt, the
course titles are put into the standard system, which has no name. Package
statement cannot appear anywhere in system. It must be the first linee of your
system or you can bypass it.
2. public class HelloWorld:
This linee has various elements of Java development.
a. public: This is accessibility modifier keyword and key phrase which informs
compiler accessibility to category. Various principles of accessibility modifiers
can be community, secured,private or standard (no value).
b. class: This keyword and key term used to announce category. Name of class
(HelloWorld) followed by this keyword and key term.
3. Feedback section:
We can create comments in Java in two ways.
a. Line comments: It begins with two forward slashes (//) and proceed to the
end of the presentline. Line comments do not have an finishing icon.
b. Block comments start with a forward slasj and an asterisk (/*) and end with
an asterisk and a forward slash (*/).Block comments can also increase across
as many lines as required.
4. public fixed gap primary (String [ ] args):
}
}
Output of above CarTest java class is as below. We can run CarTest java
system because it has primary technique. Main technique is place to begin for
any java system performance. Operating software indicates informing the Java
VIrtual Device (JVM) to Load theclass, then begin performing its primary ()
technique. Keep running til all thecode in primary is completed.