Java is loosely based on C++ syntax, and is meant to be Object-Oriented Structure of java is midway between an interpreted and a compiled language. The java compiler into Byte Codes, which are secure and portable across different platforms, compiles Java programs. These byte codes are essentially instructions encapsulated in single type, to what is known as a java virtual machine (JVM), which resides in standard browser.
JVM verifies these byte codes when downloaded by the browser for integrity. JVM’s available for almost all OS. JVM converts these byte codes into machine specific instructions at runtime.
Java is a general purpose; object oriented programming language by Sun Microsystems of USA in 1991. The java team which included Patrick Naughton discovered that the existing languages like C and C++ had limitations in terms of both reliability and portability. However, they modeled their new language java on C and C++ but removed a number of features of C and C++ that were considered as sources of problems and thus made java a really simple, reliable, portable and powerful language. The most striking feature of the language is that it is a platform-neutral language. Java is a programming language, a runtime system, a set of development tools, and an application programming interface (API). Java is the first programming language that is not tied to any particular hardware or operating system. Programs developed in java can be executed anywhere on any system.
Java is an object-oriented programming language with a built-in application programming interface (API) that can handle graphics and user interfaces and that can be used to create applications or applets. Because of its rich set of API's, similar to Macintosh and Windows, and its platform independence, Java can also be thought of as a platform in itself. Java also has standard libraries for doing mathematics.
Much of the syntax of Java is the same as C and C++. One major difference is that Java does not have pointers. However, the biggest difference is that you must write object oriented code in Java. Procedural pieces of code can only be embedded in objects. In the following we assume that the reader has some familiarity with a programming language. In particular, some familiarity with the syntax of C/C++ is useful.
In Java we distinguish between applications, which are programs that perform the same functions as those written in other programming languages, and applets, which are programs that can be embedded in a Web page and accessed over the Internet. Our initial focus will be on writing applications. When a program is compiled, a byte code is produced that can be read and executed by any platform that can run Java.
Features of java
Every time you that you download a “normal” program, you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those who did scanned them for viruses prior to execution. Most users still worried about the possibility of infecting their systems with a virus. In addition, another type of malicious program exists that must be guarded against. This type of program can gather private information, such as credit card numbers, bank account balances, and passwords. Java answers both these concerns by providing a “firewall” between a network application and your computer. When you use a Java-compatible Web browser, you can safely download Java applets without fear of virus infection or malicious intent.
For programs to be dynamically downloaded to all the various types of platforms connected to the Internet, some means of generating portable executable code is needed. As you will see, the same mechanism that helps ensure security also helps create portability. Indeed, Java’s solution to these two problems is both elegant and efficient.
THE BYTE CODE
The key that allows the Java to solve the security and portability problems is that the output of Java compiler is Byte code. Byte code is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for byte code.
Translating a Java program into byte code helps makes it much easier to run a program in a wide variety of environments. The reason is, once the run-time package exists for a given system, any Java program can run on it.
Although Java was designed for interpretation, there is technically nothing about Java that prevents on-the-fly compilation of byte code into native code. Sun has just completed its Just In Time (JIT) compiler for byte code. When the JIT compiler is a part of JVM, it compiles byte code into executable code in real time, on a piece-by-piece, demand basis. It is not possible to compile an entire Java program into executable code all at once, because Java performs various run-time checks that can be done only at run time. The JIT compiles code, as it is needed, during execution.
In java, everything is an Object. Java can be easily extended since it is based on the Object model.
Unlike many other programming languages including C and C++ when Java is compiled, it is not compiled into platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by virtual Machine (JVM) on whichever platform it is being run.
Java is designed to be easy to learn. If you understand the basic concept of OOP java would be easy to master.
With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption.
Java compiler generates an architecture-neutral object file format which makes the compiled code to be executable on many processors, with the presence Java runtime system.
Being architectural neutral and having no implementation dependent aspects of the specification makes Java portable. Compiler and Java is written in ANSI C with a clean portability boundary which is a POSIX subset.
Java makes an effort to eliminate error prone situations by emphasizing mainly on compile time error checking and runtime checking.
With Java's multi-threaded feature, it is possible to write programs that can do many tasks simultaneously. This design feature allows developers to construct smoothly running interactive applications.
Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light weight process.
With the use of Just-In-Time compilers Java enables high performance.
Java is designed for the distributed environment of the internet.
Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry extensive amount of run-time information that can be used to verify and resolve accesses to objects on run-time.
Importance of Java to the Internet
Java has had a profound effect on the Internet. This is because; Java expands the Universe of objects that can move about freely in Cyberspace. In a network, two categories of objects are transmitted between the Server and the Personal computer. They are: Passive information and Dynamic active programs. The Dynamic, Self-executing programs cause serious problems in the areas of Security and probability. But, Java addresses those concerns and by doing so, has opened the door to an exciting new form of program called the Applet.
Java can be used to create two types of Programs
Applications and Applets: An application is a program that runs on our Computer under the operating system of that computer. It is more or less like one creating using C or C++. Java’s ability to create Applets makes it important. An Applet is an application designed to be transmitted over the Internet and executed by a Java –compatible web browser. An applet is actually a tiny Java program, dynamically downloaded across the network, just like an image. But the difference is, it is an intelligent program, not just a media file. It can react to the user input and dynamically change.
Java is too Effective
Java has caused more excitement than any development on the Internet since Mosaic. Java was the first way to include inline sound and animation in a web page. Java also lets users interact with a web page. Instead of just reading it and perhaps filling out a form, users can now play games, calculate spreadsheets, chat in real-time, get continuously updated data and much, much more.
Here are just a few of the many things Java can do for a web page:
Inline sounds that play in real-time whenever a user loads a page.
Music that plays in the background on a page.
Cartoon style animations.
Multiplayer interactive games
What makes Java special
e.g. let’s say you want to use EPS files on your Web site. Previously you had to wait until at least one web browser implemented EPS support. Now with the help of java you can write your own code to view EPS files and send it to any client that requests your page at the same time they request the EPS file.
E.g. suppose you want people to be able to search your electronic card catalog. However, the card catalog database exists on a mainframe system that doesn't speak HTTP. Before Java you could hope that some browser implemented your proprietary card catalog protocol or you could try to program some intermediate cgi-bin on a UNIX box that can speak HTTP and talk to the card catalog, not an easy task. With Java when a client wants to talk to your card catalog you can send them the code they need to do so. You don't have to try to force things through an http server on port 80 that were never meant to go through it. If that were all Java was, it would still be more interesting than a <'marquee'> or <'frame'> tag in some new browser beta.
Java is platform independent. A Java program can run equally well on any architecture that has a Java enabled browser. With the release of Netscape Navigator 2.0 that includes Windows 95, Windows NT, the Mac OS, Sun Solaris, Sun OS 4.1.3, SGI IRIX, OSF/1, HP-UX with more to come. Java isn't just for web sites. Java is a programming language that lets you do almost anything you can do with a traditional programming language like Fortran or C++. However, Java has learned from the mistakes of its predecessors. It is considerably cleaner and easier to use than those languages.
Scope of Java in India
In today’s era of competition, organizations are struggling to stand first and get more and more benefits in every field. In India, Information technology is the one, which has held the first position for long years with many innovative ideas and trends. There are many ways to develop nay product or application. When we talk of programming languages and technologies, Java is the most popular and common platform, which used to develop several applications for the systems as well as embedded devices like mobile, laptops, tablets and many more. It is an object-oriented programming language and has a simple object model, as it has derived from C and C++. It provides a virtual machine, which is accumulated with byte-code and because of this bytecode java is platform independent and portable language as well as highly secured.
You can simply install Java on any PC and because of its portable concept it enables developers to run programs anywhere. Also, Java is platform independent and thanks to the internet, so many people have been able to make a difference, earn a place in the spotlight with their own framework or tool, be recognized for their contribution, and really influence the Java world.
Future Scope of Java Programmers in India
Following are some of the points that shows opportunities for Java Developers in India:
India’s $150 billion IT services outsourcing industry is adapting to the changes that are fast setting in because of automation and higher adoption of digital technologies.
Government projects like Digital India and Demonetization surely will give rise to demand for Java Programmers in every company going digital.
The opportunities available for a Java Programmer are immense, and their technical knowledge is very valuable. Best of all, to be an expert in Java Programming, you don’t necessarily have to get a college degree. Just take the right training and improve your skills, and you are eligible to become a Java Programmer with bright future.
Skills required to become Java Programmer:
JSP / Servlets.
Web Frameworks like Struts /Struts 2/ Springs.
Service Oriented Architecture / Web Services – SOAP / REST.
Markup Languages like XML and JSON.
Cities that offer the highest salaries to Java Developers in India:
Gurgaon, Bangalore, New Delhi, Mumbai, Pune, Hyderabad, Chennai, Kolkata, Ahmedabad