![Phân tích tư tưởng của nhân dân qua đoạn thơ: Những người vợ nhớ chồng… Những cuộc đời đã hóa sông núi ta trong Đất nước của Nguyễn Khoa Điềm](https://timtailieu.net/upload/document/136415/phan-tich-tu-tuong-cua-nhan-dan-qua-doan-tho-039-039-nhung-nguoi-vo-nho-chong-nhung-cuoc-doi-da-hoa-song-nui-ta-039-039-trong-dat-nuoc-cua-nguyen-khoa-136415.jpg)
Lecture Java programming language: Loop Structures and Strings - Ho Dac Hung
Số trang: 10
Loại file: pdf
Dung lượng: 137.62 KB
Lượt xem: 8
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Loop Structures and Strings has main content such as the while statement, the do-while statemen, infinite loops , the for statement, debugging techniques, the string class, the string class, comparing strings.
Nội dung trích xuất từ tài liệu:
Lecture Java programming language: Loop Structures and Strings - Ho Dac Hung Loop Structures and Strings Ho Dac Hung1 The while Statement The while statement is a loop structure, which executes a set of statements over and over again based on a condition. The while statement takes the form: while (){ }2 The do-while Statement The do-while statement is an alternative form of the while statement. In the do-while statement the condition is not evaluated until after the first execution of the loop. The do-while takes the following form: do { } while ();3 Infinite Loops The condition of a loop is used to determine when the loop should stop executing. A while continues until its conditon is false. What happens though, if the condition never becomes false? The result is an infinite loop – one which continues forever.4 The for Statement The for statement is a loop structure that executes a set of statements a fixed number of times. The for statement takes the form: for (; ; ){ }5 Debugging Techniques The source of bugs, which are often logic errors, can be hard to determine withoud tools for debugging an application. Debugging is the process of getting an application work correctly. A debugger is used to select statements where execution will be suspsned. These statements are called breakpoints.6 The String class Java includes the String class in the java.lang package for storing and manipulating strings. The String class is large, with numerous methods for string manipulation.7 The String class charAt(int index) length() isEmpty() substring(int start, int end) substring(int start) toLowerCase() toUpperCase() trim() replace(String str1, String str2) …8 Comparing Strings Strings are compared when determining equality or alphabetical order. Relational operators are used to compare primitive types. When objects need to be comparedm methods from their class are used. Some of the String class methods are used to compare strings.9 Comparing Strings equals(String str) equalsIgnoreCase(String str) compareTo(String str) compareToIgnoreCase(String str) indexOf(String str) startWith(String str) endWith(String str) …10
Nội dung trích xuất từ tài liệu:
Lecture Java programming language: Loop Structures and Strings - Ho Dac Hung Loop Structures and Strings Ho Dac Hung1 The while Statement The while statement is a loop structure, which executes a set of statements over and over again based on a condition. The while statement takes the form: while (){ }2 The do-while Statement The do-while statement is an alternative form of the while statement. In the do-while statement the condition is not evaluated until after the first execution of the loop. The do-while takes the following form: do { } while ();3 Infinite Loops The condition of a loop is used to determine when the loop should stop executing. A while continues until its conditon is false. What happens though, if the condition never becomes false? The result is an infinite loop – one which continues forever.4 The for Statement The for statement is a loop structure that executes a set of statements a fixed number of times. The for statement takes the form: for (; ; ){ }5 Debugging Techniques The source of bugs, which are often logic errors, can be hard to determine withoud tools for debugging an application. Debugging is the process of getting an application work correctly. A debugger is used to select statements where execution will be suspsned. These statements are called breakpoints.6 The String class Java includes the String class in the java.lang package for storing and manipulating strings. The String class is large, with numerous methods for string manipulation.7 The String class charAt(int index) length() isEmpty() substring(int start, int end) substring(int start) toLowerCase() toUpperCase() trim() replace(String str1, String str2) …8 Comparing Strings Strings are compared when determining equality or alphabetical order. Relational operators are used to compare primitive types. When objects need to be comparedm methods from their class are used. Some of the String class methods are used to compare strings.9 Comparing Strings equals(String str) equalsIgnoreCase(String str) compareTo(String str) compareToIgnoreCase(String str) indexOf(String str) startWith(String str) endWith(String str) …10
Tìm kiếm theo từ khóa liên quan:
Java programming language Bài giảng ngôn ngữ lập trình Java Loop Structures and Strings The while statement The do-while statemen The for statement The string class The string classTài liệu liên quan:
-
Bài giảng Chương 1: Cơ bản về ngôn ngữ lập trình Java
19 trang 27 0 0 -
Bài giảng Ngôn ngữ lập trình Java: Chương 6.2 - TS. Phan Nguyên Hải
34 trang 26 0 0 -
Bài giảng Ngôn ngữ lập trình Java: Phần 2 - TS. Vũ Hữu Tiến
65 trang 24 0 0 -
Bài giảng Công nghệ Java: Chương 0 - Trần Quang Diệu
6 trang 23 0 0 -
Lecture Introduction to Java programming - Chapter 15: Graphics
32 trang 22 0 0 -
Bài giảng Ngôn ngữ lập trình Java căn bản
115 trang 21 0 0 -
Lecture Java programming language: Inheritance and Polymorphism - Ho Dac Hung
11 trang 21 0 0 -
Lecture Introduction to Java programming - Chapter 1: Introduction to computers, programs, and Java
63 trang 19 0 0 -
Bài giảng Ngôn ngữ lập trình Java: Chương 4 - TS. Phan Nguyên Hải
56 trang 19 0 0 -
Bài giảng Ngôn ngữ lập trình Java: Chương 6.1 - TS. Phan Nguyên Hải
74 trang 18 0 0