Download presentation
Presentation is loading. Please wait.
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 Java SE Downloads page The NetBeans IDE – For all platforms: NetBeans IDE Downloads pageNetBeans 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 editor for 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 understood by the programmer The computer’s language is far more primitive than Java A compiler is an application that translates a program from the Java language to a language more suitable for executing on the computer. The compiler takes a file with a.java extension as input (your program) and produces a file 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 your computer 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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.