Java is an object oriented programming language which is used predominantly in present times.The main advantage of java is it is platform independent.This is because in Java the source code is first converted into byte code that can run on any java virtual machine which doesn’t depend on the system.But this byte code should be converted into machine code which is done by interpreter which depends on type system we use.
Java is developed by James Gosling of Sun micro system which is released in 1995.There were five primary goals in the creation of the Java language:
- It should be “simple, object-oriented and familiar”
- It should be “robust and secure”
- It should be “architecture-neutral and portable”
- It should execute with “high performance”
- It should be “interpreted, threaded, and dynamic”
Reserved words or keywords are words that have a specific meaning to the compiler and cannot be used for other purposes in the program. For example, when the compiler sees the word class, it understands that the word after class is the name for the class.Reserved words are public, static, and void.
Since java is object oriented language it uses classes and objects while programming.Lets us now discuss about classes and objects in detail.The class is the essential Java construct. A class is a template or blueprint for objects. To program in Java, you must understand classes and be able to write and use them. The mystery of the class will continue to be unveiled throughout this book. For now, though, understand that a program is defined by using one or more classes. Objects are defined as the instances of the objects.Objects are the physical representation of the classes.