Java is a high-level object-oriented programming language developed by the Sun Microsystems in 1990s. Though it is associated with the World Wide Web but it is older than the origin of Web.
Introduction to java Programming
Java is influenced by many concepts of C++, which is the descendent of C language. Many of characters in java is inherited from these two language.
Java is a portable, platform-independent language that can be use to produce code that would run on a variety of CPUs under different environments.
The trouble with C, C++(and most other languages) is that they are designed to compiled for a specific target. Although it is possible to compile program for any type of CPU but for this you need to develop a compiler specially for this, which is expensive and time consuming to create.
Why Java is important to internet
Java applications can move freely in cyberspace. Means it supports almost every machine in cyberspace. This is due to the byte code.
Security :
Whenever we download a program, we have risk of virus infection. In addition to viruses, malwares also affects us. They can gather private information, such as credit card numbers, bank account balances and password, by searching the contents of your computer's local file system. Java protect us from both by providing a "firewall" between a networked application and your computer.
The magical 'Bytecode'
The key that allows Java to solve both the security and the portability problem is that the output of a Java compiler is not executable code. Rather , it is a byte code.
Bytecode is highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine(JVM). Also, Java is an interpreter for bytecode.
Types of java program :
We can create three types of program with Java.
Application- Applications are the program that are runs in a window. The application uses a GUI(Graphical User Interface) For getting input and show output.
Applet- Applet is a special program that run in a browser over internet or intranet.
Servlets- Servlets is a special type of program that is server side program and enhances the server's functionality. Servlets are used to invoke the the processes.
JSP : JSP uses concepts of servlet and HTML. You can use both inside your single page. But after compilation it converts into servlet.
[ 0 ] Comments