How to Get Started Writing Computer Programs

How to Get Started Writing Computer Programs thumbnail
Get Started Writing Computer Programs

Getting started writing computer programs can appear at first to be a challenging task. If you have never programmed before but have taken a class in a foreign language, you can think of computer programming in a parallel light. You start by choosing a language to learn and setting up an environment in which to do so. Then you start with basic skills and slowly build upon them until you can accomplish complex programming tasks. In the last decade, object-oriented languages have become more popular in schools that teach introductory programming because of the advanced skills that can be developed in a faster time frame. Java is a popular programming language to use to write your first computer program.

Things You'll Need

  • Internet access
  • Administrator access to your computer
Show More

Instructions

    • 1

      Download the latest Java software developer's kit from Sun Microsystems and install it on your computer.

    • 2

      Open a text editor for writing your first program. All Java program source code is saved with the default file extension .java. Save the blank document as myFirstProgram.java

    • 3

      The first program that most students learn in any program is called "Hello World." The primary purpose of the Hello World program is to ensure that the student can create a basic program in the language being taught and display the words "Hello World" to the console or screen of the development computer. To create "Hello World" in Java, type the following code into the text editor and save the file.

      class myFirstProgram

      {

      public static void main (String[] args)

      {

      System.out.println("This is my first computer Program! Hello World!");

      } // end of the main method

      }// end of class myFirstProgram

    • 4

      Open your command prompt on a Windows computer by selecting the Start->Command menus and enter the letters "cmd" or "command" to open the command prompt. Change the directory to where you saved the myFirstProgram.java file. Type the command "javac myFirstProgram.java" and hit the "enter" key. This will create the byte code that will be run in a new file called myFirstProgram.class.

    • 5

      Run the new Java program by typing "java myFirstProgram.class" on the command line. The following output will be displayed at the command prompt: "This is my first computer Program! Hello World!" and your first computer program is complete.

Related Searches:

Resources

Comments

You May Also Like

  • How to Write a Computer Program

    You May Also Like. How to Write a Software Program. To non-programmers, computers may seem vastly more intelligent than people. Actually, a...

  • Writing Computer Programs

    Writing Computer Programs.Writing computer programs is the wave of the future. Almost everything created in today's world requires a computer program to...

  • How to Write a Bibliography for Computer Programs

    Guidelines for entering bibliographies for computer software vary according to style guide. Common style guides include, but are not limited to, the...

  • How to Write a Software Program

    To non-programmers, computers may seem vastly more intelligent than people. Actually, a computer is not very smart. In fact, a computer can...

  • How to Start a Community Outreach Program

    Starting a community outreach program can be personally rewarding as well as a big help to your local community in providing much...

  • Software for Writing a Book

    Writers no longer need to rely on sorting through scattered notes and scanning pages of writing on the computer to find the...

  • How to Write Computer Code

    Learning to write computer code will require the use of a program called Python, which has very easy language to learn. Discover...

  • Book Writing Programs

    Comments. You May Also Like. Software for Writing a Book. Writers no longer need to rely on sorting through scattered notes and...

  • How to Write Job Application Letters

    Along with your resume, you need to write a job application letter, or cover letter. The purpose of a cover letter is...

  • How to Teach Writing by Using a Computer

    Writing blogs and using features from a word processor on a computer is a great way to teach the skills of writing....

  • The Best Business Writing Software

    Finding the best business writing software is a matter of personal preference. You might want a program that focuses on providing templates...

  • How to Write an Excel VBA Program

    Visual Basic for Applications, or VBA, is a simple programming language that Microsoft includes in a handful of its Office programs, including...

  • How to Write Computer Code

    Computer languages are used to instruct computers to perform tasks that computers are ideal for, such a complex mathematics and processing large...

  • How to Write Sheet Music on a Computer

    Just try to imagine how much more prolific the old music masters could have been if they had only had today's technology....

  • How to Write a Simple Program in C++

    It's common practice that instruction in C++ programming begins with creating a "Hello world" program. This involves printing a "Hello world" message...

  • How to Build a Computer Program

    A computer is an electronic piece of equipment that does nothing more than follow the instructions it's given, exactly. It can do...

  • How to Start Writing an Essay

    "Writing is hell," William Styron said. Indeed, to many writers their occupation is "like having homework every night for the rest of...

  • How to Get Started With - I Want to Write a Book

    How to get started with - I want to write a book - is easier than most people realize. This is the...

  • How to Write a Simple Program in C

    How to Write a Simple Program in C. Part of the series: Computer Training. Any text editor such as vi can be...

Related Ads

Featured