WHAT IS JAVA?
-Java is an object-oriented programming language that makes solving complex problems easier.
IS JAVA USES INTERPRETER OR COMPILER?
The java program(source code) will be compiled into a JBC(java byte code) using compiler, after that the code runs on the Java Virtual Machine which produces runtime environment using interpreter.so java uses both interpreter and compiler


JVM is used to load, verify, execute the code and to provide the
runtime environment.
Ã
Features of java:
1.
Object oriented
2.
Platform Independent
3.
Simple
4.
Architectural Neutral
5.
portable
6.
Secure
7.
Robust
8.
High performance
9.
Multithreaded
10.Distributed
11.Dynamic
12.Interpreted
first java program….!
Class
Avn
{
Public static void main(String[] args);
{
System.out.println(“hello
cse “);
}
}
-o/p:
hello cse
NOTE :
Java is case sensitive so be
carefull while writing the program regarding capital and small alphabets.
à WHAT
IS “import”?
The import statement is used
to bring certain classes or the entire packages, into visibility. As soon as
imported, a class can be referred to directly by using only its name.
The import statement
is a convenience to the programmer and is not technically needed to write
complete Java program. If you are going to refer to some few dozen classes into
your application, the import statement
will save a lot of time and typing also.
à WHAT
IS “public static void main(String[] args)”?
public static void
main(String[] args) defines the main() method. This is the starting point for
the interpreter to begin the execution of the program.
Ø Public: it is an access specifier that declares the main
method as unprotected and making it accessible to all other classes.
Ø Static: the main must be declared as static since the
interpreter uses this method before any objects are created.
Ø Void: void states that the main method doesnot return any
value.
à WHAT
IS “System.out.println” ?
Java is purely an object
oriented programming language, every method must be part of an object. The println
method is a member of the out object, which is a static data member of System
class. The println always appends a newline(i.e., the output will start on a
newline).
0 Comments
Got questions? Feel free to ask!