Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Sức khỏe - Y tế
Văn bản luật
Nông Lâm Ngư
Kỹ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Giới thiệu
Đăng ký
Đăng nhập
Tìm
Danh mục
Kinh doanh - Marketing
Kinh tế quản lý
Biểu mẫu - Văn bản
Tài chính - Ngân hàng
Công nghệ thông tin
Tiếng anh ngoại ngữ
Kĩ thuật công nghệ
Khoa học tự nhiên
Khoa học xã hội
Văn hóa nghệ thuật
Y tế sức khỏe
Văn bản luật
Nông lâm ngư
Kĩ năng mềm
Luận văn - Báo cáo
Giải trí - Thư giãn
Tài liệu phổ thông
Văn mẫu
Thông tin
Điều khoản sử dụng
Quy định bảo mật
Quy chế hoạt động
Chính sách bản quyền
Giới thiệu
Đăng ký
Đăng nhập
0
Trang chủ
Công Nghệ Thông Tin
Kỹ thuật lập trình
Lecture Introduction to programming with Java - Chapter 5: Using pre-built methods
Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Introduction to programming with Java - Chapter 5: Using pre-built methods
Thảo Trang
83
33
ppt
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Chapter 5 provides knowledge of using pre-built methods. This chapter includes contents: The API library, API headings, math class, wrapper classes for primitive types, lottery example, string methods, formatted output with the printf method. | Chapter 5 - Using Pre-Built Methods The API Library API Headings Math Class Wrapper Classes for Primitive Types Lottery Example String Methods: substring indexOf lastIndexOf Formatted Output with the printf Method 1 The API Library When working on a programming problem, you should normally check to see if there are pre-built classes that meet your program's needs. If there are such pre-built classes, then use those classes (don't "reinvent the wheel"). For example: User input is a rather complicated task. The Scanner class handles user input. Whenever you need user input in a program, use the Scanner class's input methods (rather than writing and using your own input methods). Math calculations are sometimes rather complicated. The Math class handles math calculations. Whenever you need to perform non-trivial math calculations in a program, use the Math class's methods (rather than writing and using your own math methods). 2 The API Library Java's pre-built classes are stored in its class library, which is more commonly known as the Application Programming Interface (API) library. See http://download.oracle.com/javase/6/docs/api/. Java's API classes are not part of the core Java language. For a program to use an API class, the class first needs to be loaded/imported into the program. For example, to use the Scanner class, include this at the top of your program: import java.util.Scanner; The java.util thing that precedes Scanner is called a package. A package is a group of classes. The java.util package contains quite a few general-purpose utility classes. The only one you'll need for now is the Scanner class. 3 The API Library Some classes are considered to be so important that the Java compiler automatically imports them for you. The automatically imported classes are in the java.lang package. The Math class is one of those classes, so there's no need for you to import the Math class if you want to perform math operations. The Java compiler . | Chapter 5 - Using Pre-Built Methods The API Library API Headings Math Class Wrapper Classes for Primitive Types Lottery Example String Methods: substring indexOf lastIndexOf Formatted Output with the printf Method 1 The API Library When working on a programming problem, you should normally check to see if there are pre-built classes that meet your program's needs. If there are such pre-built classes, then use those classes (don't "reinvent the wheel"). For example: User input is a rather complicated task. The Scanner class handles user input. Whenever you need user input in a program, use the Scanner class's input methods (rather than writing and using your own input methods). Math calculations are sometimes rather complicated. The Math class handles math calculations. Whenever you need to perform non-trivial math calculations in a program, use the Math class's methods (rather than writing and using your own math methods). 2 The API Library Java's pre-built classes are stored
TÀI LIỆU LIÊN QUAN
Lecture Introduction to Java programming - Chapter 1: Introduction to computers, programs, and Java
Lecture Introduction to programming with Java - Chapter 1: Introduction to computers and programming
Lecture Introduction to programming with Java - Chapter 3: Java basics
Lecture Introduction to Java programming - Chapter 2: Elementary programming
Lecture Introduction to Java programming - Chapter 16: Event-driven programming
Lecture Introduction to programming with Java - Chapter 6: Object-oriented programming
Lecture Introduction to programming with Java - Chapter 7: Object-oriented programming – Additional details
Lecture Introduction to Java programming - Chapter 15: Graphics
Lecture Introduction to programming with Java - Chapter 16: GUI programming basics
Lecture Introduction to Java programming - Chapter 8: Objects and classes
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.