SlideShare a Scribd company logo
1 of 2
Download to read offline
Comments added...
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
*
* @author prmsh
*/
public class SaveMatrix {
public static void main(String args[]) {
//declaring matrix..
String[][] data = new String[4][4];
int row = 0;
// opening and reading file
File file = new File("matrix.txt");
try {
Scanner sc = new Scanner(file);
while (sc.hasNextLine()) {
String line = sc.nextLine();
//splitting each row by spaces
String[] lineArray = line.split(" ");
//storing into array
for(int i=0; i
Solution
Comments added...
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
/**
*
* @author prmsh
*/
public class SaveMatrix {
public static void main(String args[]) {
//declaring matrix..
String[][] data = new String[4][4];
int row = 0;
// opening and reading file
File file = new File("matrix.txt");
try {
Scanner sc = new Scanner(file);
while (sc.hasNextLine()) {
String line = sc.nextLine();
//splitting each row by spaces
String[] lineArray = line.split(" ");
//storing into array
for(int i=0; i

More Related Content

Similar to Comments added... import java.io.File; import java.io.FileNotF.pdf

Jedi Slides Intro2 Chapter12 Advanced Io Streams
Jedi Slides Intro2 Chapter12 Advanced Io StreamsJedi Slides Intro2 Chapter12 Advanced Io Streams
Jedi Slides Intro2 Chapter12 Advanced Io StreamsDon Bosco BSIT
 
Hi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdfHi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdfPRATIKSINHA7304
 
Java IO Streams V4
Java IO Streams V4Java IO Streams V4
Java IO Streams V4Sunil OS
 
Java căn bản - Chapter12
Java căn bản - Chapter12Java căn bản - Chapter12
Java căn bản - Chapter12Vince Vo
 
Chapter 12 - File Input and Output
Chapter 12 - File Input and OutputChapter 12 - File Input and Output
Chapter 12 - File Input and OutputEduardo Bergavera
 
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdfplease navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdfaioils
 
Input output files in java
Input output files in javaInput output files in java
Input output files in javaKavitha713564
 
In Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdfIn Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdfColinjSWDavidsonn
 
Input is from a file- The input is all doubles- You are to input these.pdf
Input is from a file- The input is all doubles- You are to input these.pdfInput is from a file- The input is all doubles- You are to input these.pdf
Input is from a file- The input is all doubles- You are to input these.pdfColinjSWDavidsonn
 
Session 23 - JDBC
Session 23 - JDBCSession 23 - JDBC
Session 23 - JDBCPawanMM
 
Core java concepts
Core java concepts Core java concepts
Core java concepts javeed_mhd
 
Complete the following Java code such that it opens a file named Fruit.docx
Complete the following Java code such that it opens a file named Fruit.docxComplete the following Java code such that it opens a file named Fruit.docx
Complete the following Java code such that it opens a file named Fruit.docxljohn878
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системеDEVTYPE
 

Similar to Comments added... import java.io.File; import java.io.FileNotF.pdf (20)

File Handling.pptx
File Handling.pptxFile Handling.pptx
File Handling.pptx
 
Lab4
Lab4Lab4
Lab4
 
Jedi Slides Intro2 Chapter12 Advanced Io Streams
Jedi Slides Intro2 Chapter12 Advanced Io StreamsJedi Slides Intro2 Chapter12 Advanced Io Streams
Jedi Slides Intro2 Chapter12 Advanced Io Streams
 
Hi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdfHi, I need help with a java programming project. specifically practi.pdf
Hi, I need help with a java programming project. specifically practi.pdf
 
Java IO Streams V4
Java IO Streams V4Java IO Streams V4
Java IO Streams V4
 
Java căn bản - Chapter12
Java căn bản - Chapter12Java căn bản - Chapter12
Java căn bản - Chapter12
 
Chapter 12 - File Input and Output
Chapter 12 - File Input and OutputChapter 12 - File Input and Output
Chapter 12 - File Input and Output
 
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdfplease navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
please navigate to cs112 webpage and go to assignments -- Trees. Th.pdf
 
Code red SUM
Code red SUMCode red SUM
Code red SUM
 
Bhaloo
BhalooBhaloo
Bhaloo
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
 
In Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdfIn Java- Input is from a file- The input is all doubles- You are to in.pdf
In Java- Input is from a file- The input is all doubles- You are to in.pdf
 
Input is from a file- The input is all doubles- You are to input these.pdf
Input is from a file- The input is all doubles- You are to input these.pdfInput is from a file- The input is all doubles- You are to input these.pdf
Input is from a file- The input is all doubles- You are to input these.pdf
 
Session 23 - JDBC
Session 23 - JDBCSession 23 - JDBC
Session 23 - JDBC
 
Chapter 6 Java IO File
Chapter 6 Java IO FileChapter 6 Java IO File
Chapter 6 Java IO File
 
Core Java
Core JavaCore Java
Core Java
 
Core java concepts
Core java concepts Core java concepts
Core java concepts
 
srgoc
srgocsrgoc
srgoc
 
Complete the following Java code such that it opens a file named Fruit.docx
Complete the following Java code such that it opens a file named Fruit.docxComplete the following Java code such that it opens a file named Fruit.docx
Complete the following Java code such that it opens a file named Fruit.docx
 
5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе5. Ввод-вывод, доступ к файловой системе
5. Ввод-вывод, доступ к файловой системе
 

More from anwarfoot

0 to -1 Solution 0 to -1 .pdf
  0 to -1  Solution  0 to -1  .pdf  0 to -1  Solution  0 to -1  .pdf
0 to -1 Solution 0 to -1 .pdfanwarfoot
 
phosphate group and deoxyribose The groups are .pdf
                     phosphate group and deoxyribose  The groups are  .pdf                     phosphate group and deoxyribose  The groups are  .pdf
phosphate group and deoxyribose The groups are .pdfanwarfoot
 
Osmosis .pdf
                     Osmosis                                      .pdf                     Osmosis                                      .pdf
Osmosis .pdfanwarfoot
 
in case of solid oxygen the atoms of oxygen are s.pdf
                     in case of solid oxygen the atoms of oxygen are s.pdf                     in case of solid oxygen the atoms of oxygen are s.pdf
in case of solid oxygen the atoms of oxygen are s.pdfanwarfoot
 
Yeast is a microorganism and doesnt itself rise.pdf
                     Yeast is a microorganism and doesnt itself rise.pdf                     Yeast is a microorganism and doesnt itself rise.pdf
Yeast is a microorganism and doesnt itself rise.pdfanwarfoot
 
First, lets analyze what each component of the .pdf
                     First, lets analyze what each component of the .pdf                     First, lets analyze what each component of the .pdf
First, lets analyze what each component of the .pdfanwarfoot
 
when they reach equilibrium te cell potential is .pdf
                     when they reach equilibrium te cell potential is .pdf                     when they reach equilibrium te cell potential is .pdf
when they reach equilibrium te cell potential is .pdfanwarfoot
 
E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf
                     E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf                     E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf
E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdfanwarfoot
 
D) Not B) because Cl-Benzene bond develops a doub.pdf
                     D) Not B) because Cl-Benzene bond develops a doub.pdf                     D) Not B) because Cl-Benzene bond develops a doub.pdf
D) Not B) because Cl-Benzene bond develops a doub.pdfanwarfoot
 
YesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdf
YesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdfYesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdf
YesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdfanwarfoot
 
We know that from Nernst Equation ,E o cell = E o – ( 0.059 n ) .pdf
We know that from Nernst Equation ,E o cell = E o – ( 0.059  n ) .pdfWe know that from Nernst Equation ,E o cell = E o – ( 0.059  n ) .pdf
We know that from Nernst Equation ,E o cell = E o – ( 0.059 n ) .pdfanwarfoot
 
lower.. think about it.. take a straw draw a line.pdf
                     lower.. think about it.. take a straw draw a line.pdf                     lower.. think about it.. take a straw draw a line.pdf
lower.. think about it.. take a straw draw a line.pdfanwarfoot
 
r= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdf
r= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdfr= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdf
r= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdfanwarfoot
 
From left to right iodocyclopropane; 1-bromo-3-m.pdf
                     From left to right iodocyclopropane; 1-bromo-3-m.pdf                     From left to right iodocyclopropane; 1-bromo-3-m.pdf
From left to right iodocyclopropane; 1-bromo-3-m.pdfanwarfoot
 
For inorganic compounds Chemical properties remai.pdf
                     For inorganic compounds Chemical properties remai.pdf                     For inorganic compounds Chemical properties remai.pdf
For inorganic compounds Chemical properties remai.pdfanwarfoot
 
n=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdf
n=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdfn=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdf
n=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdfanwarfoot
 
Over forty interstellar molecules have been found, ranging from simp.pdf
Over forty interstellar molecules have been found, ranging from simp.pdfOver forty interstellar molecules have been found, ranging from simp.pdf
Over forty interstellar molecules have been found, ranging from simp.pdfanwarfoot
 
One of the four prominent symptoms of typhoid is coated tongue. Even.pdf
One of the four prominent symptoms of typhoid is coated tongue. Even.pdfOne of the four prominent symptoms of typhoid is coated tongue. Even.pdf
One of the four prominent symptoms of typhoid is coated tongue. Even.pdfanwarfoot
 
Meselson and Stahl in 1957 gave experimental evidence that each DNA .pdf
Meselson and Stahl in 1957 gave experimental evidence that each DNA .pdfMeselson and Stahl in 1957 gave experimental evidence that each DNA .pdf
Meselson and Stahl in 1957 gave experimental evidence that each DNA .pdfanwarfoot
 
Introduction One of the key goals for the Windows Subsystem for Li.pdf
Introduction One of the key goals for the Windows Subsystem for Li.pdfIntroduction One of the key goals for the Windows Subsystem for Li.pdf
Introduction One of the key goals for the Windows Subsystem for Li.pdfanwarfoot
 

More from anwarfoot (20)

0 to -1 Solution 0 to -1 .pdf
  0 to -1  Solution  0 to -1  .pdf  0 to -1  Solution  0 to -1  .pdf
0 to -1 Solution 0 to -1 .pdf
 
phosphate group and deoxyribose The groups are .pdf
                     phosphate group and deoxyribose  The groups are  .pdf                     phosphate group and deoxyribose  The groups are  .pdf
phosphate group and deoxyribose The groups are .pdf
 
Osmosis .pdf
                     Osmosis                                      .pdf                     Osmosis                                      .pdf
Osmosis .pdf
 
in case of solid oxygen the atoms of oxygen are s.pdf
                     in case of solid oxygen the atoms of oxygen are s.pdf                     in case of solid oxygen the atoms of oxygen are s.pdf
in case of solid oxygen the atoms of oxygen are s.pdf
 
Yeast is a microorganism and doesnt itself rise.pdf
                     Yeast is a microorganism and doesnt itself rise.pdf                     Yeast is a microorganism and doesnt itself rise.pdf
Yeast is a microorganism and doesnt itself rise.pdf
 
First, lets analyze what each component of the .pdf
                     First, lets analyze what each component of the .pdf                     First, lets analyze what each component of the .pdf
First, lets analyze what each component of the .pdf
 
when they reach equilibrium te cell potential is .pdf
                     when they reach equilibrium te cell potential is .pdf                     when they reach equilibrium te cell potential is .pdf
when they reach equilibrium te cell potential is .pdf
 
E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf
                     E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf                     E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf
E° = 0.07 - (0.14)     = 0.21 V 2UO22+(aq) + Sn(s.pdf
 
D) Not B) because Cl-Benzene bond develops a doub.pdf
                     D) Not B) because Cl-Benzene bond develops a doub.pdf                     D) Not B) because Cl-Benzene bond develops a doub.pdf
D) Not B) because Cl-Benzene bond develops a doub.pdf
 
YesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdf
YesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdfYesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdf
YesBecause (1,1) is missing, it is not reflexive though (3,3) (2,2.pdf
 
We know that from Nernst Equation ,E o cell = E o – ( 0.059 n ) .pdf
We know that from Nernst Equation ,E o cell = E o – ( 0.059  n ) .pdfWe know that from Nernst Equation ,E o cell = E o – ( 0.059  n ) .pdf
We know that from Nernst Equation ,E o cell = E o – ( 0.059 n ) .pdf
 
lower.. think about it.. take a straw draw a line.pdf
                     lower.. think about it.. take a straw draw a line.pdf                     lower.. think about it.. take a straw draw a line.pdf
lower.. think about it.. take a straw draw a line.pdf
 
r= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdf
r= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdfr= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdf
r= 1+ sin theta drd = cos = 0Therefore = 2Solutionr=.pdf
 
From left to right iodocyclopropane; 1-bromo-3-m.pdf
                     From left to right iodocyclopropane; 1-bromo-3-m.pdf                     From left to right iodocyclopropane; 1-bromo-3-m.pdf
From left to right iodocyclopropane; 1-bromo-3-m.pdf
 
For inorganic compounds Chemical properties remai.pdf
                     For inorganic compounds Chemical properties remai.pdf                     For inorganic compounds Chemical properties remai.pdf
For inorganic compounds Chemical properties remai.pdf
 
n=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdf
n=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdfn=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdf
n=4 l=3 we know that L=h2(l(l+1))L=3.710-34Solutionn.pdf
 
Over forty interstellar molecules have been found, ranging from simp.pdf
Over forty interstellar molecules have been found, ranging from simp.pdfOver forty interstellar molecules have been found, ranging from simp.pdf
Over forty interstellar molecules have been found, ranging from simp.pdf
 
One of the four prominent symptoms of typhoid is coated tongue. Even.pdf
One of the four prominent symptoms of typhoid is coated tongue. Even.pdfOne of the four prominent symptoms of typhoid is coated tongue. Even.pdf
One of the four prominent symptoms of typhoid is coated tongue. Even.pdf
 
Meselson and Stahl in 1957 gave experimental evidence that each DNA .pdf
Meselson and Stahl in 1957 gave experimental evidence that each DNA .pdfMeselson and Stahl in 1957 gave experimental evidence that each DNA .pdf
Meselson and Stahl in 1957 gave experimental evidence that each DNA .pdf
 
Introduction One of the key goals for the Windows Subsystem for Li.pdf
Introduction One of the key goals for the Windows Subsystem for Li.pdfIntroduction One of the key goals for the Windows Subsystem for Li.pdf
Introduction One of the key goals for the Windows Subsystem for Li.pdf
 

Recently uploaded

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
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
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
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
 

Comments added... import java.io.File; import java.io.FileNotF.pdf

  • 1. Comments added... import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; /** * * @author prmsh */ public class SaveMatrix { public static void main(String args[]) { //declaring matrix.. String[][] data = new String[4][4]; int row = 0; // opening and reading file File file = new File("matrix.txt"); try { Scanner sc = new Scanner(file); while (sc.hasNextLine()) { String line = sc.nextLine(); //splitting each row by spaces String[] lineArray = line.split(" "); //storing into array for(int i=0; i Solution Comments added... import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; /** *
  • 2. * @author prmsh */ public class SaveMatrix { public static void main(String args[]) { //declaring matrix.. String[][] data = new String[4][4]; int row = 0; // opening and reading file File file = new File("matrix.txt"); try { Scanner sc = new Scanner(file); while (sc.hasNextLine()) { String line = sc.nextLine(); //splitting each row by spaces String[] lineArray = line.split(" "); //storing into array for(int i=0; i