Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
Wongyos Keardsri
1,526 views
Java-Answer Chapter 07
Read more
1
Save
Share
Embed
Embed presentation
Download
Downloaded 171 times
1
/ 9
2
/ 9
3
/ 9
4
/ 9
5
/ 9
6
/ 9
7
/ 9
8
/ 9
9
/ 9
More Related Content
PDF
Java-Answer Chapter 05-06
by
Wongyos Keardsri
PDF
Java-Chapter 01 Introduction to Java Programming
by
Wongyos Keardsri
PDF
Java-Chapter 02 Data Operations and Processing
by
Wongyos Keardsri
PDF
31b - JUnit and Mockito.pdf
by
gauravavam
PDF
Java Strings Tutorial | String Manipulation in Java | Java Tutorial For Begin...
by
Edureka!
PDF
6.Flow control
by
UsableLabs
PPT
Network programming in Java
by
Tushar B Kute
PPTX
Methods in java
by
chauhankapil
Java-Answer Chapter 05-06
by
Wongyos Keardsri
Java-Chapter 01 Introduction to Java Programming
by
Wongyos Keardsri
Java-Chapter 02 Data Operations and Processing
by
Wongyos Keardsri
31b - JUnit and Mockito.pdf
by
gauravavam
Java Strings Tutorial | String Manipulation in Java | Java Tutorial For Begin...
by
Edureka!
6.Flow control
by
UsableLabs
Network programming in Java
by
Tushar B Kute
Methods in java
by
chauhankapil
What's hot
PDF
Java-Answer Chapter 01-04 (For Print)
by
Wongyos Keardsri
PPS
String and string buffer
by
kamal kotecha
PPTX
THE PACKAGES CONCEPT IN JAVA PROGRAMMING.pptx
by
Kavitha713564
PPTX
Core java
by
Ravi varma
PDF
Introduction java
by
Fouad Root
DOCX
4SI-Algo-2025 manuel et resumé de programmation
by
jokertunis2022
PPTX
Java Tokens
by
Madishetty Prathibha
PPSX
Collections - Lists, Sets
by
Hitesh-Java
PPT
Java basic tutorial by sanjeevini india
by
Sanjeev Tripathi
PPTX
Unit testing
by
Mani Kanth
PDF
CORE JAVA
by
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
PPTX
Mockito
by
sudha rajamanickam
PDF
Unit Testing in Python
by
Haim Michael
PPTX
Magento présentation
by
Rémi MORIN
PDF
ISTQB Projelerde Spesifikasyona Dayalı Test Teknikleri
by
PEM Proje Eğitim Merkezi
PPTX
Java Unit Testing
by
Nayanda Haberty
PDF
Support Java Avancé Troisième Partie
by
ENSET, Université Hassan II Casablanca
PPT
JAVA Polymorphism
by
Mahi Mca
PPTX
Fundamental programming structures in java
by
Shashwat Shriparv
PDF
Cours c#
by
zan
Java-Answer Chapter 01-04 (For Print)
by
Wongyos Keardsri
String and string buffer
by
kamal kotecha
THE PACKAGES CONCEPT IN JAVA PROGRAMMING.pptx
by
Kavitha713564
Core java
by
Ravi varma
Introduction java
by
Fouad Root
4SI-Algo-2025 manuel et resumé de programmation
by
jokertunis2022
Java Tokens
by
Madishetty Prathibha
Collections - Lists, Sets
by
Hitesh-Java
Java basic tutorial by sanjeevini india
by
Sanjeev Tripathi
Unit testing
by
Mani Kanth
CORE JAVA
by
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
Mockito
by
sudha rajamanickam
Unit Testing in Python
by
Haim Michael
Magento présentation
by
Rémi MORIN
ISTQB Projelerde Spesifikasyona Dayalı Test Teknikleri
by
PEM Proje Eğitim Merkezi
Java Unit Testing
by
Nayanda Haberty
Support Java Avancé Troisième Partie
by
ENSET, Université Hassan II Casablanca
JAVA Polymorphism
by
Mahi Mca
Fundamental programming structures in java
by
Shashwat Shriparv
Cours c#
by
zan
Similar to Java-Answer Chapter 07
PDF
Java-Answer Chapter 10-11
by
Wongyos Keardsri
PDF
Java-Answer Chapter 12-13
by
Wongyos Keardsri
PDF
Java-Answer Chapter 08-09
by
Wongyos Keardsri
PDF
หน่วยที่2 เรื่อง โครงสร้างข้อมูล นางสาว สิรินยา ปาโจด ม.5
by
สิรินยา ปาโจด
PDF
หน่วยที่2 โครงสร้างข้อมูล นาย ธนพงษ์ น่านกร เลขที่ 1 ชั้น ม.5
by
palmyZommanow
PPT
Array 2
by
นายพิศณุ ท่าสอน
PDF
Java-Answer Chapter 01-04
by
Wongyos Keardsri
PDF
Java-Chapter 09 Advanced Statements and Applications
by
Wongyos Keardsri
PDF
2 1 แบบรูป
by
Preecha Yeednoi
PPT
4 control statement
by
Panuzzuda' Buaa
PDF
Java-Chapter 11 Recursions
by
Wongyos Keardsri
PDF
Java Programming: อะเรย์และคอลเล็กชั่น
by
Thanachart Numnonda
PDF
Sorting
by
suebloei
PDF
Sorting
by
Meaw Sukee
PDF
Discrete-Chapter 09 Algorithms
by
Wongyos Keardsri
PDF
Learn 3
by
Sompon Ketsuwong
PDF
บทที่ 5 ข้อมูลชนิดอาร์เรย์และสตริง 6.1
by
Little Tukta Lita
PPTX
Computer Programming 3
by
Saranyu Srisrontong
PDF
(Big One) C Language - 10 เทคนิคอัลกอริทึมแบบ divide-and-conquer
by
Kittinan Noimanee
PDF
Java-Answer Chapter 07 (For Print)
by
Wongyos Keardsri
Java-Answer Chapter 10-11
by
Wongyos Keardsri
Java-Answer Chapter 12-13
by
Wongyos Keardsri
Java-Answer Chapter 08-09
by
Wongyos Keardsri
หน่วยที่2 เรื่อง โครงสร้างข้อมูล นางสาว สิรินยา ปาโจด ม.5
by
สิรินยา ปาโจด
หน่วยที่2 โครงสร้างข้อมูล นาย ธนพงษ์ น่านกร เลขที่ 1 ชั้น ม.5
by
palmyZommanow
Array 2
by
นายพิศณุ ท่าสอน
Java-Answer Chapter 01-04
by
Wongyos Keardsri
Java-Chapter 09 Advanced Statements and Applications
by
Wongyos Keardsri
2 1 แบบรูป
by
Preecha Yeednoi
4 control statement
by
Panuzzuda' Buaa
Java-Chapter 11 Recursions
by
Wongyos Keardsri
Java Programming: อะเรย์และคอลเล็กชั่น
by
Thanachart Numnonda
Sorting
by
suebloei
Sorting
by
Meaw Sukee
Discrete-Chapter 09 Algorithms
by
Wongyos Keardsri
Learn 3
by
Sompon Ketsuwong
บทที่ 5 ข้อมูลชนิดอาร์เรย์และสตริง 6.1
by
Little Tukta Lita
Computer Programming 3
by
Saranyu Srisrontong
(Big One) C Language - 10 เทคนิคอัลกอริทึมแบบ divide-and-conquer
by
Kittinan Noimanee
Java-Answer Chapter 07 (For Print)
by
Wongyos Keardsri
More from Wongyos Keardsri
PDF
How to Study and Research in Computer-related Master Program
by
Wongyos Keardsri
PPT
The next generation intelligent transport systems: standards and applications
by
Wongyos Keardsri
PPT
IP address anonymization
by
Wongyos Keardsri
PDF
SysProg-Tutor 03 Unix Shell Script Programming
by
Wongyos Keardsri
PDF
SysProg-Tutor 02 Introduction to Unix Operating System
by
Wongyos Keardsri
PDF
SysProg-Tutor 01 Introduction to C Programming Language
by
Wongyos Keardsri
PDF
Discrete-Chapter 11 Graphs Part III
by
Wongyos Keardsri
PDF
Discrete-Chapter 11 Graphs Part II
by
Wongyos Keardsri
PDF
Discrete-Chapter 11 Graphs Part I
by
Wongyos Keardsri
PDF
Discrete-Chapter 10 Trees
by
Wongyos Keardsri
PDF
Discrete-Chapter 08 Relations
by
Wongyos Keardsri
PDF
Discrete-Chapter 07 Probability
by
Wongyos Keardsri
PDF
Discrete-Chapter 06 Counting
by
Wongyos Keardsri
PDF
Discrete-Chapter 05 Inference and Proofs
by
Wongyos Keardsri
PDF
Discrete-Chapter 04 Logic Part II
by
Wongyos Keardsri
PDF
Discrete-Chapter 04 Logic Part I
by
Wongyos Keardsri
PDF
Discrete-Chapter 03 Matrices
by
Wongyos Keardsri
PDF
Discrete-Chapter 02 Functions and Sequences
by
Wongyos Keardsri
PDF
Discrete-Chapter 01 Sets
by
Wongyos Keardsri
PDF
Discrete-Chapter 12 Modeling Computation
by
Wongyos Keardsri
How to Study and Research in Computer-related Master Program
by
Wongyos Keardsri
The next generation intelligent transport systems: standards and applications
by
Wongyos Keardsri
IP address anonymization
by
Wongyos Keardsri
SysProg-Tutor 03 Unix Shell Script Programming
by
Wongyos Keardsri
SysProg-Tutor 02 Introduction to Unix Operating System
by
Wongyos Keardsri
SysProg-Tutor 01 Introduction to C Programming Language
by
Wongyos Keardsri
Discrete-Chapter 11 Graphs Part III
by
Wongyos Keardsri
Discrete-Chapter 11 Graphs Part II
by
Wongyos Keardsri
Discrete-Chapter 11 Graphs Part I
by
Wongyos Keardsri
Discrete-Chapter 10 Trees
by
Wongyos Keardsri
Discrete-Chapter 08 Relations
by
Wongyos Keardsri
Discrete-Chapter 07 Probability
by
Wongyos Keardsri
Discrete-Chapter 06 Counting
by
Wongyos Keardsri
Discrete-Chapter 05 Inference and Proofs
by
Wongyos Keardsri
Discrete-Chapter 04 Logic Part II
by
Wongyos Keardsri
Discrete-Chapter 04 Logic Part I
by
Wongyos Keardsri
Discrete-Chapter 03 Matrices
by
Wongyos Keardsri
Discrete-Chapter 02 Functions and Sequences
by
Wongyos Keardsri
Discrete-Chapter 01 Sets
by
Wongyos Keardsri
Discrete-Chapter 12 Modeling Computation
by
Wongyos Keardsri
Java-Answer Chapter 07
1.
ANSWER 07
Computer Programming using Java 1 CHAPTER อาเรย์หนึ่งมิติ ANS-07 (One Dimensional Arrays) โจทย์ ข้อที่ 1 [ระดับง่ าย] 3 0 1 2 3 4 5 6 7 8 9 14 0 4 4 6 7 1 2 5 7 10 9 Index Out of Bounds 2 7 5 21 โจทย์ ข้อที่ 2 [ระดับง่ าย] 1) long num[] = new long[200]; 2) int dice[] = new int[6]; 3) double avgGrade[] = new double[451]; 4) String grade[] = new String[369]; 5) boolean x[] = new boolean[11]; 6) long merge[] = new long[num.length + dice.length]; โจทย์ ข้อที่ 3 [ระดับง่ าย] 1) int x = num[49]; 2) int y = num[50]; 3) char c = code[code.length - 1]; 4) bank[12] = var1; 5) bank[0] = var2; 6) bank[bank.length - 2] = var3; โจทย์ ข้อที่ 4 [ระดับง่ าย–ปานกลาง] 1) int n[] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 }; for (int i = 0; i < n.length; i++) { System.out.println(n[i]); } 2) int m[] = new int[1000]; for (int i = 0; i < m.length; i++) { m[i] = i + 1; } © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
2.
2
Computer Programming using Java ANSWER 07 3) double a[] = new double[100]; for (int i = 0; i < a.length; i++) { System.out.print("Enter a[" + i + "]"); a[i] = kb.nextDouble(); } 4) int odd = 0, even = 0; for (int i = 0; i < x.length; i++) { if (x[i] % 2 == 0) even++; else odd++; } System.out.println("Odd Number: " + odd); System.out.println("Even Number: " + even); 5) System.out.print("Enter x: "); int x = kb.nextInt() int index = -1; for (int i = 0; i < num.length; i++) { if(num[i] == x) index = i; break; } System.out.println("First Index: " + index); โจทย์ ข้อที่ 5 [ระดับปานกลาง] import java.util.Scanner; public class MergeArrays { public static void main(String[] args) { int a[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int b[] = { 1, 4, 6, 8, 10, 12 }; int ab[] = new int[a.length + b.length]; for (int i = 0; i < a.length; i++) { ab[i] = a[i]; } for (int i = a.length; i < ab.length; i++) { ab[i] = b[i - a.length]; } for (int i = 0; i < ab.length; i++) { System.out.println(ab[i]); } } //End of main } //End of class © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
3.
ANSWER 07
Computer Programming using Java 3 โจทย์ ข้อที่ 6 [ระดับยาก] import java.util.Scanner; public class SplitArray { public static void main(String[] args) { int num[] = {95, 1, 6, 34, 5, 9, 123, -2, 57, 82, 12, 79, 45, 34, 1}; Scanner kb = new Scanner(System.in); System.out.print("Enter x: "); int x = kb.nextInt(); int count = 0, a = 0, b = 0; for (int i = 0; i < num.length; i++) { if (num[i] >= x) count++; } int upper[] = new int[count]; int lower[] = new int[num.length - count]; for (int i = 0; i < num.length; i++) { if (num[i] >= x) upper[a++] = num[i]; else lower[b++] = num[i]; } } //End of main } //End of class โจทย์ ข้อที่ 7 [ระดับยาก] import java.util.Scanner; public class ReverseArray { public static void main(String[] args) { int num[] = {95, 1, 6, 34, 5, 9, 123, -2, 57, 82, 12, 79, 45, 34, 1}; for (int i = 0; i < num.length / 2; i++) { int temp = num[i]; num[i] = num[num.length - i - 1]; num[num.length - i - 1] = temp; } } //End of main } //End of class © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
4.
4
Computer Programming using Java ANSWER 07 โจทย์ ข้อที่ 8 [ระดับยาก] import java.util.Scanner; public class EqualityOfArrays { public static void main(String[] args) { int a[] = { 1, 2, 3, 4, 5, 6, 7 }, b[] = { 1, 2, 3, 5, 5, 7, 7 }; if (a.length == b.length) { int count = 0; for (i = 0; i < a.length; i++) { if (a[i] == b[i]) count++; } if (count == a.length) System.out.println("A = B"); else System.out.println("A != B"); } else { System.out.println("A != B"); } } //End of main } //End of class โจทย์ ข้อที่ 9 [ระดับยาก] import java.util.Scanner; public class LastSecondSearch { public static void main(String[] args) { int num[] = { 3, 2, 1, 10, 2, 8, 3, 2, 1, 1, 8, 5, 10, 11, 7, 6, 10 }; Scanner kb = new Scanner(System.in); System.out.print("Enter number: "); int key = kb.nextInt(); int index = -1, count = 0; for (int i = num.length - 1; i >= 0; i--) { if (key == num[i]) count++; if (count == 2) { index = i; break; } } System.out.println("Second Last index: " + index); } //End of main } //End of class © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
5.
ANSWER 07
Computer Programming using Java 5 โจทย์ ข้อที่ 10 [ระดับง่ าย] การจัดเรี ยงแบบเลือก รอบที่ 1 30 45 23 2 19 14 5 9 99 รอบที่ 2 30 9 23 2 19 14 5 45 99 รอบที่ 3 5 9 23 2 19 14 30 45 99 รอบที่ 4 5 9 14 2 19 23 30 45 99 รอบที่ 5 5 9 14 2 19 23 30 45 99 รอบที่ 6 5 9 2 14 19 23 30 45 99 รอบที่ 7 5 2 9 14 19 23 30 45 99 รอบที่ 8 2 5 9 14 19 23 30 45 99 การจัดเรี ยงแบบฟอง รอบที่ 1 30 45 23 2 19 14 5 99 9 30 23 45 2 19 14 5 99 9 30 23 2 45 19 14 5 99 9 30 23 2 19 45 14 5 99 9 30 23 2 19 14 45 5 99 9 30 23 2 19 14 5 45 99 9 30 23 2 19 14 5 45 99 9 30 23 2 19 14 5 45 9 99 รอบที่ 2 23 30 2 19 14 5 45 9 99 © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
6.
6
Computer Programming using Java ANSWER 07 23 2 30 19 14 5 45 9 99 23 2 19 30 14 5 45 9 99 23 2 19 14 30 5 45 9 99 23 2 19 14 5 30 45 9 99 23 2 19 14 5 30 45 9 99 23 2 19 14 5 30 9 45 99 โจทย์ ข้อที่ 11 [ระดับง่ าย] int x[] = {30, 45, 23, 2, 19, 14, 5, 99, 9}; 30 45 23 2 19 14 5 99 9 จัดเรียงข้ อมล ู 2 5 9 14 19 23 30 45 99 รอบที่ 1 2 5 9 14 19 23 30 45 99 left mid right รอบที่ 2 2 5 9 14 left mid รอบที่ 3 9 14 การสืบค้ นแบบทวิภาคใช้ เวลา 4 รอบในการสืบค้ น Left right การสืบค้ นแบบลําดับใช้ เวลา 6 รอบในการสืบค้ น mid ดังนัน การสืบค้ นแบบทวิภาคทํางานได้ เร็วกว่ า ้ รอบที่ 4 14 Left right mid © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
7.
ANSWER 07
Computer Programming using Java 7 โจทย์ ข้อที่ 12 [ระดับยาก] import java.util.Scanner; import java.io.*; public class SortMonthByBirthDate { public static void main(String[] args) throws IOException { String month[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; int count[] = new int[12]; Scanner in = new Scanner(new File("birthdate.txt")); while (in.hasNext()) { String d = in.next(); int a = d.indexOf("-"); int b = d.lastIndexOf("-"); int m = Integer.parseInt(d.substring(a + 1, b)); count[m - 1]++; } for (int i = count.length - 1; i >= 1; i--) { int minIndex = 0; for (int j = 0; j <= i; j++) if (count[j] < count[minIndex]) minIndex = j; int temp = count[i]; count[i] = count[minIndex]; count[minIndex] = temp; String stemp = month[i]; month[i] = month[minIndex]; month[minIndex] = stemp; } for (int i = 0; i < month.length; i++) { System.out.println(month[i] + " [" + count[i] + " people]"); } } //End of main } //End of class โจทย์ ข้อที่ 13 [ระดับเทพ] import java.io.*; import java.util.Scanner; public class ScoreCalculator { public static void main(String[] args) throws IOException { //สร้ างตัวอ่ านชื่อ in1 … Scanner in1 = new Scanner(new File("student.txt")); int count = 0; while (in1.hasNext()) { in1.nextLine(); count++; } © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
8.
8
Computer Programming using Java ANSWER 07 //สร้ างตัวอ่ านชื่อ in2 … String id[] = new String[count]; Scanner in2 = new Scanner(new File("student.txt")); int i = 0; while (in2.hasNext()) { id[i] = in2.nextLine(); i++; } //สร้ างตัวเขียนชื่อ out1 … PrintStream out1 = new PrintStream(new File("student.txt")); for (i = 0; i < id.length; i++) { out1.print(id[i] + "t"); out1.print((int)(Math.random() * 6) + "t"); out1.print((int)(Math.random() * 11) + "t"); out1.print((int)(Math.random() * 11) + "t"); out1.print((int)(Math.random() * 31) + "t"); out1.print((int)(Math.random() * 46) + "n"); } //สร้ างตัวอ่ านชื่อ in3 … Scanner in3 = new Scanner(new File("student.txt")); int sc[] = new int[count]; i = 0; while (in3.hasNext()) { in3.next(); for (int j = 1; j <= 5; j++) { sc[i] += in3.nextInt(); } i++; } //สร้ างตัวเขียนชื่อ out2 … PrintStream out2 = new PrintStream(new File("totalscore.txt")); for (i = 0; i < id.length; i++) { out2.print(id[i] + "t"); out2.print(sc[i] + "t"); if (sc[i] >= 80) out2.print("An"); if (sc[i] >= 70 && sc[i] < 80) out2.print("Bn"); if (sc[i] >= 60 && sc[i] < 70) out2.print("Cn"); if (sc[i] >= 50 && sc[i] < 60) out2.print("Dn"); if (sc[i] < 50) out2.print("Fn"); } © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
9.
ANSWER 07
Computer Programming using Java 9 //หาคะแนนรวม … int max = 0; int min = 0; double sum = 0.0; int fq[] = new int[101]; for (i = 0; i < sc.length; i++) { if (sc[i] > sc[max]) max = i; if (sc[i] < sc[min]) min = i; sum += sc[i]; fq[sc[i]]++; } int maxFq = 0; for (i = 0; i < fq.length; i++) { if (fq[i] > fq[maxFq]) maxFq = i; } //แสดงผลลัพธ์ … out2.println("Max Score: " + sc[max]); out2.println("Max Score Freq: " + fq[sc[max]]); out2.println("Max Score Year: " + (54 - Integer.parseInt(id[max].substring(0, 2)))); out2.println("Min Score: " + sc[min]); out2.println("Min Score Freq: " + fq[sc[min]]); out2.println("Min Score Year: " + (54 - Integer.parseInt(id[min].substring(0, 2)))); out2.println("Avg Score: " + sum / count); out2.println("Max Freq: " + fq[maxFq]); out2.print("List Max Freq Score: "); for (i = 0; i < fq.length; i++) { if (fq[i] == fq[maxFq]) out2.print(i + " "); } out2.println(); //คําสั่งในการปิ ดแฟมข้ อมล ้ ู in1.close(); in2.close(); in3.close(); out1.close(); out2.close(); } //End of main } //End of class © สงวนลิขสิทธิ์ พฤศจิกายน 2553 (ปรับปร ุงครังที่ 7 ฉบับใช้ติวภาค 2/2553) เรียบเรียงโดย วงศ์ยศ เกิดศรี (แบงค์) ้
Download