1 / 14

CENG 161 Introduction to Computer Science

CENG 161 Introduction to Computer Science. Instructor: Dr. Nurdan SARAN Lab Assistant: Arzu Burçak Sönmez. Requirements. To write your first program, you'll need: The Java SE Development Kit For Microsoft Windows, Solaris OS, and Linux: Java SE Downloads page The NetBeans IDE

fia
Download Presentation

CENG 161 Introduction to Computer Science

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CENG 161 Introduction to Computer Science Instructor: Dr. Nurdan SARAN Lab Assistant: Arzu Burçak Sönmez

  2. Requirements • To write your first program, you'll need: • The Java SE Development Kit • For Microsoft Windows, Solaris OS, and Linux: Java SE Downloads page • The NetBeans IDE • For all platforms: NetBeans IDE Downloads page

  3. Developing a Java program

  4. Creating a program • A Java program is nothing more than a sequence of characters stored in a file with a .java extension • You can use any text editorfor this task, or you can use one of the more sophisticated program development environments

  5. Developing a Java program

  6. Compiling a program • Programming languages are designed to be best understoodby theprogrammer • The computer’s language is far moreprimitive than Java • A compiler is an application that translates a program from theJava language to a language more suitable for executing on the computer. • The compilertakes a file with a .java extension as input (your program) and produces afile with the same name but with a .class extension (the computer-language version)

  7. Developing a Java program

  8. Executing a program • Once you compile the program, you can run it • Your computer follows your instructions • A part of the Java system known as the Java Virtual Machine (the JVM) directs yourcomputer to follow your instructions

  9. Create an IDE Project • Launch the NetBeans IDE. • On Microsoft Windows systems, you can use the NetBeans IDE item in the Start menu • In the NetBeans IDE, choose File -> New Project.

  10. Create an IDE Project • In the New Project wizard, expand the Java category and select Java Application as shown in the following figure:

  11. Create an IDE Project • In the Name and Location page of the wizard, do the following (as shown in the figure below):

  12. Create an IDE Project • The project is created and opened in the IDE.

  13. Your First Program This is a simple Java code Write the code and run it in order to see what happens

  14. The showMessageDialog Method

More Related