SlideShare a Scribd company logo
1 of 1
Download to read offline
Exercise 1 ( sec 10 ) : Write a Java program that prompt the user for the name of a file and prints
the number of lines, words, and average number of words per line. If the user does not specify
any file name, then prompt the user for the name.

More Related Content

More from deepak596396

D- Classifying Acids and Bases The pH of a solution is a number which.pdf
D- Classifying Acids and Bases The pH of a solution is a number which.pdfD- Classifying Acids and Bases The pH of a solution is a number which.pdf
D- Classifying Acids and Bases The pH of a solution is a number which.pdfdeepak596396
 
Deliverable- Create two single user empathy maps- as described below-.pdf
Deliverable- Create two single user empathy maps- as described below-.pdfDeliverable- Create two single user empathy maps- as described below-.pdf
Deliverable- Create two single user empathy maps- as described below-.pdfdeepak596396
 
d- By how much does the supply of money supply or contract- Supply of.pdf
d- By how much does the supply of money supply or contract- Supply of.pdfd- By how much does the supply of money supply or contract- Supply of.pdf
d- By how much does the supply of money supply or contract- Supply of.pdfdeepak596396
 
Define the following terms- and explain it in your own words with exam.pdf
Define the following terms- and explain it in your own words with exam.pdfDefine the following terms- and explain it in your own words with exam.pdf
Define the following terms- and explain it in your own words with exam.pdfdeepak596396
 
Deinococcus radiodurans is a bacteria with a very peculiar special abi.pdf
Deinococcus radiodurans is a bacteria with a very peculiar special abi.pdfDeinococcus radiodurans is a bacteria with a very peculiar special abi.pdf
Deinococcus radiodurans is a bacteria with a very peculiar special abi.pdfdeepak596396
 
Define a method printFeetinchShort- with int parameters numFeet and nu.pdf
Define a method printFeetinchShort- with int parameters numFeet and nu.pdfDefine a method printFeetinchShort- with int parameters numFeet and nu.pdf
Define a method printFeetinchShort- with int parameters numFeet and nu.pdfdeepak596396
 
Define a method named orderOfAppearance() that takes the name of a rol.pdf
Define a method named orderOfAppearance() that takes the name of a rol.pdfDefine a method named orderOfAppearance() that takes the name of a rol.pdf
Define a method named orderOfAppearance() that takes the name of a rol.pdfdeepak596396
 
D) there is little change across horizontal distances- Question 14 (Ma.pdf
D) there is little change across horizontal distances- Question 14 (Ma.pdfD) there is little change across horizontal distances- Question 14 (Ma.pdf
D) there is little change across horizontal distances- Question 14 (Ma.pdfdeepak596396
 
Define a method findResources() that takes two integer parameters as a.pdf
Define a method findResources() that takes two integer parameters as a.pdfDefine a method findResources() that takes two integer parameters as a.pdf
Define a method findResources() that takes two integer parameters as a.pdfdeepak596396
 
Exhibit 11-7 We want to test the hypothesis that population B has a.pdf
Exhibit 11-7    We want to test the hypothesis that population B has a.pdfExhibit 11-7    We want to test the hypothesis that population B has a.pdf
Exhibit 11-7 We want to test the hypothesis that population B has a.pdfdeepak596396
 
Exercise- You will use the TCP echo client and server code (for IPv4 v.pdf
Exercise- You will use the TCP echo client and server code (for IPv4 v.pdfExercise- You will use the TCP echo client and server code (for IPv4 v.pdf
Exercise- You will use the TCP echo client and server code (for IPv4 v.pdfdeepak596396
 
Exercise 8 1- Discuss the relevance of the Dutch disease problem for.pdf
Exercise 8  1- Discuss the relevance of the Dutch disease problem for.pdfExercise 8  1- Discuss the relevance of the Dutch disease problem for.pdf
Exercise 8 1- Discuss the relevance of the Dutch disease problem for.pdfdeepak596396
 
EXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdf
EXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdfEXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdf
EXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdfdeepak596396
 
Exercise 7 Use the function design recipe to develop a function named.pdf
Exercise 7 Use the function design recipe to develop a function named.pdfExercise 7 Use the function design recipe to develop a function named.pdf
Exercise 7 Use the function design recipe to develop a function named.pdfdeepak596396
 
Exercise 3- Consider an exponentially distributed random variable f(X-.pdf
Exercise 3- Consider an exponentially distributed random variable f(X-.pdfExercise 3- Consider an exponentially distributed random variable f(X-.pdf
Exercise 3- Consider an exponentially distributed random variable f(X-.pdfdeepak596396
 
Exercise 5 Suppose that two dice were rolled and it was observed that.pdf
Exercise 5 Suppose that two dice were rolled and it was observed that.pdfExercise 5 Suppose that two dice were rolled and it was observed that.pdf
Exercise 5 Suppose that two dice were rolled and it was observed that.pdfdeepak596396
 
Exercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdf
Exercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdfExercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdf
Exercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdfdeepak596396
 
Exercise 4- These financial statement items are for Batra Corporation.pdf
Exercise 4- These financial statement items are for Batra Corporation.pdfExercise 4- These financial statement items are for Batra Corporation.pdf
Exercise 4- These financial statement items are for Batra Corporation.pdfdeepak596396
 
Exercise 3-4 For a system with discrete energy levels- give a formula.pdf
Exercise 3-4 For a system with discrete energy levels- give a formula.pdfExercise 3-4 For a system with discrete energy levels- give a formula.pdf
Exercise 3-4 For a system with discrete energy levels- give a formula.pdfdeepak596396
 
Exercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdf
Exercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdfExercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdf
Exercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdfdeepak596396
 

More from deepak596396 (20)

D- Classifying Acids and Bases The pH of a solution is a number which.pdf
D- Classifying Acids and Bases The pH of a solution is a number which.pdfD- Classifying Acids and Bases The pH of a solution is a number which.pdf
D- Classifying Acids and Bases The pH of a solution is a number which.pdf
 
Deliverable- Create two single user empathy maps- as described below-.pdf
Deliverable- Create two single user empathy maps- as described below-.pdfDeliverable- Create two single user empathy maps- as described below-.pdf
Deliverable- Create two single user empathy maps- as described below-.pdf
 
d- By how much does the supply of money supply or contract- Supply of.pdf
d- By how much does the supply of money supply or contract- Supply of.pdfd- By how much does the supply of money supply or contract- Supply of.pdf
d- By how much does the supply of money supply or contract- Supply of.pdf
 
Define the following terms- and explain it in your own words with exam.pdf
Define the following terms- and explain it in your own words with exam.pdfDefine the following terms- and explain it in your own words with exam.pdf
Define the following terms- and explain it in your own words with exam.pdf
 
Deinococcus radiodurans is a bacteria with a very peculiar special abi.pdf
Deinococcus radiodurans is a bacteria with a very peculiar special abi.pdfDeinococcus radiodurans is a bacteria with a very peculiar special abi.pdf
Deinococcus radiodurans is a bacteria with a very peculiar special abi.pdf
 
Define a method printFeetinchShort- with int parameters numFeet and nu.pdf
Define a method printFeetinchShort- with int parameters numFeet and nu.pdfDefine a method printFeetinchShort- with int parameters numFeet and nu.pdf
Define a method printFeetinchShort- with int parameters numFeet and nu.pdf
 
Define a method named orderOfAppearance() that takes the name of a rol.pdf
Define a method named orderOfAppearance() that takes the name of a rol.pdfDefine a method named orderOfAppearance() that takes the name of a rol.pdf
Define a method named orderOfAppearance() that takes the name of a rol.pdf
 
D) there is little change across horizontal distances- Question 14 (Ma.pdf
D) there is little change across horizontal distances- Question 14 (Ma.pdfD) there is little change across horizontal distances- Question 14 (Ma.pdf
D) there is little change across horizontal distances- Question 14 (Ma.pdf
 
Define a method findResources() that takes two integer parameters as a.pdf
Define a method findResources() that takes two integer parameters as a.pdfDefine a method findResources() that takes two integer parameters as a.pdf
Define a method findResources() that takes two integer parameters as a.pdf
 
Exhibit 11-7 We want to test the hypothesis that population B has a.pdf
Exhibit 11-7    We want to test the hypothesis that population B has a.pdfExhibit 11-7    We want to test the hypothesis that population B has a.pdf
Exhibit 11-7 We want to test the hypothesis that population B has a.pdf
 
Exercise- You will use the TCP echo client and server code (for IPv4 v.pdf
Exercise- You will use the TCP echo client and server code (for IPv4 v.pdfExercise- You will use the TCP echo client and server code (for IPv4 v.pdf
Exercise- You will use the TCP echo client and server code (for IPv4 v.pdf
 
Exercise 8 1- Discuss the relevance of the Dutch disease problem for.pdf
Exercise 8  1- Discuss the relevance of the Dutch disease problem for.pdfExercise 8  1- Discuss the relevance of the Dutch disease problem for.pdf
Exercise 8 1- Discuss the relevance of the Dutch disease problem for.pdf
 
EXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdf
EXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdfEXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdf
EXERCISE 7 - Let (Xn)n1 be a sequence of random variables such that Xn.pdf
 
Exercise 7 Use the function design recipe to develop a function named.pdf
Exercise 7 Use the function design recipe to develop a function named.pdfExercise 7 Use the function design recipe to develop a function named.pdf
Exercise 7 Use the function design recipe to develop a function named.pdf
 
Exercise 3- Consider an exponentially distributed random variable f(X-.pdf
Exercise 3- Consider an exponentially distributed random variable f(X-.pdfExercise 3- Consider an exponentially distributed random variable f(X-.pdf
Exercise 3- Consider an exponentially distributed random variable f(X-.pdf
 
Exercise 5 Suppose that two dice were rolled and it was observed that.pdf
Exercise 5 Suppose that two dice were rolled and it was observed that.pdfExercise 5 Suppose that two dice were rolled and it was observed that.pdf
Exercise 5 Suppose that two dice were rolled and it was observed that.pdf
 
Exercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdf
Exercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdfExercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdf
Exercise 4- Suppose that a Bernoulli-type experiment is carried out as.pdf
 
Exercise 4- These financial statement items are for Batra Corporation.pdf
Exercise 4- These financial statement items are for Batra Corporation.pdfExercise 4- These financial statement items are for Batra Corporation.pdf
Exercise 4- These financial statement items are for Batra Corporation.pdf
 
Exercise 3-4 For a system with discrete energy levels- give a formula.pdf
Exercise 3-4 For a system with discrete energy levels- give a formula.pdfExercise 3-4 For a system with discrete energy levels- give a formula.pdf
Exercise 3-4 For a system with discrete energy levels- give a formula.pdf
 
Exercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdf
Exercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdfExercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdf
Exercise 3-16 (Algo) Weighted average- Production cost report LO P2 El.pdf
 

Recently uploaded

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 

Recently uploaded (20)

Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Exercise 1(sec10) - Write a Java program that prompt the user for the.pdf

  • 1. Exercise 1 ( sec 10 ) : Write a Java program that prompt the user for the name of a file and prints the number of lines, words, and average number of words per line. If the user does not specify any file name, then prompt the user for the name.