lecture 01


 

WHAT IS JAVA?

            Java is a programming language, it is majorly an object-oriented and platform-independent language. Java was developed by James Gosling at sun microsystems in the year of 1995.

            -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).


                                                               

No comments:

Post a Comment

Got questions? Feel free to ask!

Types of Arrays in C Programming | Lecture 10

In C programming, arrays are a fundamental concept that allows you to store multiple values of the same data type in a single variable. ...