Đang chuẩn bị liên kết để tải về tài liệu:
Lecture An introduction to Object-Oriented Programming with Java - Chapter 2: Getting started with Java

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

We will describe the basic structure of simple Java programs in this chapter. We will also describe the steps you follow to run Java programs. We expect you to actually run these sample programs to verify that your computer (either your own or the one at the school’s computer center) is set up properly to run the sample programs presented in the book. It is important to verify this now. | Chapter 2 Getting Started with Java Chapter 2 Objectives After you have read and studied this chapter, you should be able to Identify the basic components of Java programs. Write simple Java programs. Describe the difference between object declaration and object creation. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Objectives, cont. After you have read and studied this chapter, you should be able to Describe the process of creating and running Java programs. Use the Date, SimpleDateFormat, String, and JOptionPane classes from the standard Java packages. Develop Java programs using the incremental development approach. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. 2.1 The First Java Program This first program displays a window on the screen. The size of the window is 300 x 200 pixels, and the default title is My First Java Program. The fundamental OOP concept illustrated by the program: An object-oriented program uses objects. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. 2.1 The First Java Program /* Chapter 2 Sample Program: Displaying a Window File: Ch2Sample1.java */ import javax.swing.*; class Ch2Sample1 { public static void main(String[ ] args){ JFrame myWindow; myWindow = new JFrame(); myWindow.setSize(300, 200); myWindow.setTitle(“My First Java Program”); myWindow.setVisible(true); } } ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 2.1 Result of running the Ch2Sample1 program. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 2.2 The program diagram for the Ch2Sample1 program. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Fig. 2.3 The program diagram for the Ch2Sample1 program that shows the dependency relationship. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. 2.1 The First Java Program To use an . | Chapter 2 Getting Started with Java Chapter 2 Objectives After you have read and studied this chapter, you should be able to Identify the basic components of Java programs. Write simple Java programs. Describe the difference between object declaration and object creation. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Objectives, cont. After you have read and studied this chapter, you should be able to Describe the process of creating and running Java programs. Use the Date, SimpleDateFormat, String, and JOptionPane classes from the standard Java packages. Develop Java programs using the incremental development approach. ©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. 2.1 The First Java Program This first program displays a window on the screen. The size of the window is 300 x 200 pixels, and the default title is My First Java Program. The fundamental OOP concept illustrated by the program: An .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.