tailieunhanh - Lecture An introduction to object-oriented programming with Java: Chapter 2 - C. Thomas Wu

Chapter 2 - Getting started with Java. 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 creation; describe the process of creating and running Java programs; use the Date, SimpleDateFormat, String, and Scanner standard classes; develop Java programs, using the incremental development approach. | ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 - Chapter 2 Getting Started with Java Animated Version Introduction to OOP with Java 4th Ed, C. Thomas Wu © The McGraw-Hill Companies, Inc. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 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 creation Describe the process of creating and running Java programs Use the Date, SimpleDateFormat, String, and Scanner standard classes Develop Java programs, using the incremental development approach Intro to OOP with Java, C. Thomas Wu ©The McGraw-Hill Companies, Inc. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 - The First Java Program The fundamental OOP concept illustrated by the program: An object-oriented program uses objects. This program displays a window on the screen. The size of the window is set to 300 pixels wide and 200 pixels high. Its title is set to My First Java Program. Intro to OOP with Java, C. Thomas Wu ©The McGraw-Hill Companies, Inc. It’s kind of obvious, but the most fundamental important concept in OOP is the use of objects in a program. We will illustrate this key concept in the first sample program. The program, when executed, will display a window on the screen. The text displayed in the window’s title bar will be My First Java Program. The size of the window is set to 300 pixels wide and 200 pixels high. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 - Program Ch2Sample1 import .*; class Ch2Sample1 { public static void main(String[ ] args) { JFrame myWindow; myWindow = new JFrame( ); (300, 200); (“My First Java Program”); (true); | ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 - Chapter 2 Getting Started with Java Animated Version Introduction to OOP with Java 4th Ed, C. Thomas Wu © The McGraw-Hill Companies, Inc. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 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 creation Describe the process of creating and running Java programs Use the Date, SimpleDateFormat, String, and Scanner standard classes Develop Java programs, using the incremental development approach Intro to OOP with Java, C. Thomas Wu ©The McGraw-Hill Companies, Inc. ©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 - The First Java Program The fundamental OOP concept illustrated by the program:

crossorigin="anonymous">
Đã 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.