Java was invented and came into be in 1995 and was developed by a company called Microsoft and release. It is a high profile language used in programming. This programming language has a variety of platforms which includes mac os, UNIX versions and also the Windows technology. To understand how to use java you must go through a thorough java tutorial to learn the basics of it Below here is a complete guide on how to use java. Basics of JAVA learning and development To get started in learning how Java works, you will need to get familiar with the basics. Although Java is an easy to learn a programming language, there are changes in software from time to time So, it is an option to get familiar with some main writing codes. Java Basics - Syntax in Java (the language itself) - Java statements - Codes and Codec - Encrypted comments (written as a footnote after the program is written) Data types Primitive data, object data, literal Values, constants and fine executable keyword. Java is comprised of many different technologies to support many different types of application development. There's the Javatpoint Java Foundation Classes (JFC a.k.a. Swing) for building rich-client applications. There are the Servlet and JavaServer Pages technologies for creating modern server-side web applications. And of course, there's Enterprise JavaBeans (EJBs) used to build highly-scalable back-end (enterprise) systems. From a learning perspective, a starting point for learning each technology within the Java platform is to create a Hello World program. As "Hello World" programs go, the primary purpose of the exercise is to prove out the language semantics, the technology concepts, the development process, and the execution process. Typically, when you are successful, you are greeted with a "Hello World" message. In the Java SE platform, there are two primary types of applications. The first form is considered a stand-alone application. It's only requirements to execute are a operating-system compliant version of the Java Runtime Environment. Stand-alone applications can be headless (command-line, server-like applications) or incorporate a rich user interface. Stand-alone applications are typically executed with the Java application launcher known as java. It's reasonable to think of the Java application launcher as the JRE, containing the platform libraries and the JVM. The second form of a Java SE application is called an applet. Applets execute within a browser. Most modern web browsers can execute Java Applets using the JRE installed on the end-users operating system. The following steps will show you how to create a stand-alone, headless Javatpoint Java application. Before you Begin To complete this exercise, you will need to ensure the Java compiler (javac) and the Java application launcher (java) are in your path. You can either adjust your path using System environment variables or in your shell. Many people create an environment variable known as JAVA_HOME which refers to the installation directory of the JOE. They then adjust the PATH environment variable to include %JAVA_HOME%bin. Creating and running a Java Application 1. Create a directory where you will place your files for this exercise. We are going to be using the directory C: work for these exercises in the screenshots. 2. Open a new file in text editor and enter the following code into the file. On Windows, you can use either Notepad or WordPad to create the text file. public class HelloWorld public static void main( String 0 args) { System.out.println("Hello World"); ) ) 3. Save the file as HelloWorld.java be sure to capitalize the file name exactly as it is written here). 4. Open a command window or shell window and change to c: work directory (where you just saved the HelloWorld.java file). You might want to check that you are in the right directory by doing a directory listing. 5. Run the command javac HelloWorld.java at the command line. If you entered the program correctly, you should see something like the screenshot in figure 1-5. If you saw something else, it probably means that you entered the program incorrectly. 6. Once the program has compiled correctly, check to see that there is the file named HelloWorld.class in the directory. If there isn't, you more than likely experienced a compile error. 7. Run the Java application by typing java HelloWorld at the command prompt. 8. You should see the output
This java tutorial will be of great essence to your knowledge of how to use java.
This java tutorial will be of great essence to your knowledge of how to use java.
No comments:
Post a Comment