Preview

Programming Language and Java

Better Essays
Open Document
Open Document
1755 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Programming Language and Java
1.1 Your First Java Program: Hello World

In this section, our plan is to lead you into the world of Java programming by taking you through the three basic steps required to get a simple program running. The Java system is a collection of applications not unlike any of the other applications that you are accustomed to using (such as your word processor, e-mail program, or internet browser). As with any application, you need to be sure that Java is properly installed on your computer. You also need an editor and a terminal application. Here are system specific instructions for three popular home operating systems. [ Mac OS X · Windows · Linux ]

Programming in Java.

We break the process of programming in Java into three steps: 1. Create the program by typing it into a text editor and saving it to a file named, say, MyProgram.java. 2. Compile it by typing "javac MyProgram.java" in the terminal window. 3. Run (or execute) it by typing "java MyProgram" in the terminal window.

The first step creates the program; the second translates it into a language more suitable for machine execution (and puts the result in a file namedMyProgram.class); the third actually runs the program. • Creating a Java program. A program is nothing more than a sequence of characters, like a sentence, a paragraph, or a poem. To create one, we need only define that sequence characters using a text editor in the same way as we do for e-mail. HelloWorld.java is an example program. Type these character into your text editor and save it into a file named HelloWorld.java.
|public class HelloWorld { |
|public static void main(String[] args) { |
|System.out.println("Hello, World"); |
|} |
|}

You May Also Find These Documents Helpful

  • Satisfactory Essays

    CSO Gaddis Java Chapter1 1

    • 2953 Words
    • 29 Pages

    1-5 Why Program? • Computers are tools that can be programmed to perform many functions, such as: • spreadsheets • games • databases • etc. • word processing • Computers are versatile because they can be programmed. • Computer Programmers implement programs that perform these functions. © 2012 Pearson Education, Inc.…

    • 2953 Words
    • 29 Pages
    Satisfactory Essays
  • Better Essays

    JAVA

    • 956 Words
    • 4 Pages

    Java is one of the computer programming languages. In this language computer programmers write set of instructions using English commands instead of using numeric codes to execute certain task. Java language can be easily written and read by humans so it 's called "high level language". Once Java program is written using high-level instructions it 's translated to numeric codes because computer can understand program only in numeric version. Java language was very simple to use. Java language was developed from the ideas of C++. C++ is also a one of the powerful language but there is one drawback about it i.e., syntax of C++ is very complex. Java language is very simple to use and more powerful. Java provides high level of security so it 's used in the mobile devices were the information’s transferred over the…

    • 956 Words
    • 4 Pages
    Better Essays
  • Satisfactory Essays

    I declare that, apart from properly referenced quotations, this report is my own work and contains no plagiarism; it has not been submitted previously for any other assessed unit on this or other courses.…

    • 2145 Words
    • 9 Pages
    Satisfactory Essays
  • Good Essays

    jdbc

    • 1262 Words
    • 6 Pages

    You can code and run a Java program using a simple text editor (such as Notepad) and use command prompt to run the program. Alternatively, you can use any Integrated Development Environment (IDE) (such as Eclipse, NetBeans, etc). We use Eclipse IDE.…

    • 1262 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    A computer programmer designs software programs through building logical work flow charts, the functionality of which is translated into one of several languages that computers can understand. In the majority of cases, the computer programmer also designs a graphical user interface (GUI) so that non-technical users can run the software through easy, point-and-click, menu-oriented modules. The GUI acts as a translator between the user and underlying software code, negating the need to know the command line structure of the language. Generally, there are five basic stages of development that a computer programmer addresses in designing software. They are defining the need, designing a flowchart, coding the software, debugging and beta testing. The first stage of development necessitates good interpersonal skills on. During the second stage of development the computer programmer uses analytical thinking to logically layout a flow chart. Contingencies must be built into the design so that potentially unforeseen circumstances are accounted for. This could mean constructing alternate data flows or popup error messages that instruct the user. When the design is complete the computer programmer converts the functionality of the flow chart into computer code.…

    • 3923 Words
    • 16 Pages
    Powerful Essays
  • Powerful Essays

    This lecture notes covers unit1. 1. Introduction: M255 module: Object Oriented Programming with Java concerns on teaching the principles of Object Oriented such as objects, classes, inheritance, and polymorphism using Java language. You have two CDs in this module: • Online Application CD which has the StarOffice application, and • M255 CD that has the blueJ, microworld and others. When you install M255 CD be sure that all options are selected, just determine the folders you want to install on and follow instructions during the installation process. 2. Fundamental hardware and software concepts What is a computer? A device that accepts input, processes data, stores data, and produces output. These are the main basic tasks of a computer. Simply, any computer system is composed of computer hardware and software. The hardware components of a computer system are the electronic and mechanical parts. The software components of a computer system are the intangible parts: it is a general term of all the applications, programs, and systems that run on your computer. Software consists of sets of instructions that tell a computer how to perform a particular task. 2.1 Computer Hardware The main hardware devices are classified as: 1. Essential parts of a computer : CPU & main memory 2. Peripheral devices, which is any component of the computer that is not part of essential devices, such as: Input/Output devices, secondary storage (Storage devices). Some peripherals are mounted in the same case as processor such as hard disks, others such as printers are physically outside the computer. An input device gathers and translates input into a form that the computer can process, these are devices such as: keyboard, mouse, scanner, microphone, cardreader, and bar reader.…

    • 5210 Words
    • 21 Pages
    Powerful Essays
  • Good Essays

    what make the system, there are several different styles which can be used to create a Program or…

    • 1023 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    POB sba

    • 503 Words
    • 3 Pages

    • Programs are a complete set of instructions written in a programming language, which tell a computer how to carry out a task…

    • 503 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Java Docs

    • 20537 Words
    • 83 Pages

    Java is an object-oriented programming language developed by Sun Microsystems, and modeled on C++, the Java language was designed to be small, simple, and portable across platforms and operating systems, both at the source and at the binary level, which means that Java programs (applets and applications) can run on any machine that has the Java virtual machine installed One might be surprised to learn that Java did not come into being because of Internet or World Wide Web (WWW), although it was WWW which propelled into java what it is as a language today and a de-facto standard for Server Side Softwares. Because of the similarities between C++ and Java, it is tempting to think of Java as the “Internet version of C++”, but it would be a big mistake since Java has practical and philosophical difference with C++. The history of java goes back to 1991, when a group of Sun Engineers led by Mr. Patrick Naughton and James Gosling wanted to design a small computer language that was to be used for consumer and electronic devices like Remote Controls, TV Switchboxes etc. Now since these devices were manufactured by different manufacturers who may choose different CPUs (Central Processing Units), the program should not be tied down to any single architecture. The project was code named “Green”. The languages was then called as Oak and since Oak was already an existing computer languages, it was code named as JAVA. But unfortunately, Sun did not get the project for which they were bidding and it was in 1994 with the advent of the WWW and browsers, java was propelled back in to the main stream. The JAVA as a language was reveled to the world in the Sun world 1995 conference and from there onwards different versions have come out with all the latest technologies being incorporated. The different versions are being dealt with separately in the coming modules. Java was basically invented as a platform independent software to be run on…

    • 20537 Words
    • 83 Pages
    Good Essays
  • Satisfactory Essays

    for higher education courses. Its basic objectives are to extend their reach to geographically scattered…

    • 6892 Words
    • 28 Pages
    Satisfactory Essays
  • Good Essays

    Java programming was developed by James Gosling in 1991. It was initially intended for programming home appliances, like toasters and TVs. At this time appliances ran on several different programming languages so they could be very costly to build because each appliance had several processors that were coded in different languages. Java never really caught on with the appliances at this time but Gosling realized it would be ideal for developing a web browser that could run over the internet. The web browser was developed in 1994 and was originally called WebRunner and then HotJava. In 1995 Netscape Communications Corporation made its release or a browser capable of running Java programs. From then on other companies associated with the internet developed software that uses Java programs (Wesley 13 par. 2).…

    • 768 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Java

    • 1389 Words
    • 6 Pages

    Applet A Java program that extends Applet class. This class doesn’t contain main method the program cannot be launched using Java interpreter. They are used in Web pages (via HTML file). Web server browser (ex. Internet Explorer, Mozilla Firefox).…

    • 1389 Words
    • 6 Pages
    Powerful Essays
  • Powerful Essays

    Java

    • 5383 Words
    • 22 Pages

    Building applications for the enterprise has always been challenging. Some factors that contribute to this challenge and complexity are:…

    • 5383 Words
    • 22 Pages
    Powerful Essays
  • Good Essays

    Java

    • 472 Words
    • 2 Pages

    The Java is a high-level programming language that can be supported by all of the following features:…

    • 472 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Programming Languages

    • 514 Words
    • 3 Pages

    Programming languages are vocabulary and set of grammatical rules for instructing a computer to perform specific tasks (Online). These languages have developed over a period of time and they were developed for specific purposes which other languages could not full fill.…

    • 514 Words
    • 3 Pages
    Satisfactory Essays