SlideShare a Scribd company logo
1 of 1
Download to read offline
Simple java program:
Topic: Binary File I/O
Create a simple application called contact list that will accept a person’s first and last name from
a dialog box, the accept a phone number from a dialog box.
Now save that information to a binary file.
You’ll only have one record.
----------------------------
Next,
Go back to your contact list application modify it such that that will accept a person’s first and
last name from a dialog box, then accept a phone number from a dialog box. It will repeat this
process until the user types in some sentinel value (terminating value) for name.
If the file doesn’t exist currently, you’ll create a new file. If it does, you’ll append to it.
Solution
public class SimpleJava {
string first,last, phone;
publicstaticvoid main(String[] args) throws Exception {
String first = System.console().readLine();
DataOutputStream out = openOutputStream("binary");
while(!first.equals("Terminate")) {
String last = System.console().readLine();
String phone = System.console().readLine();
out.writeUTF(first+last+phone);
String first = System.console.readline();
}
}
}

More Related Content

Similar to Simple java programTopic Binary File IOCreate a simple applic.pdf

Use Java to program the following.1. Create public java class name.pdf
Use Java to program the following.1. Create public java class name.pdfUse Java to program the following.1. Create public java class name.pdf
Use Java to program the following.1. Create public java class name.pdff3apparelsonline
 
Program reads in a file of phone numbers without area codes .pdf
Program reads in a file of phone numbers without area codes  .pdfProgram reads in a file of phone numbers without area codes  .pdf
Program reads in a file of phone numbers without area codes .pdfnitinarora01
 
Question 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdfQuestion 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdfanjandavid
 
Discovering Windows Phone 8 Artifacts and Secrets
Discovering Windows Phone 8 Artifacts and Secrets Discovering Windows Phone 8 Artifacts and Secrets
Discovering Windows Phone 8 Artifacts and Secrets Reality Net System Solutions
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook applicationsvrohith 9
 
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncCSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncMargenePurnell14
 
Main issues with the following code-Im not sure if its reading the fil.pdf
Main issues with the following code-Im not sure if its reading the fil.pdfMain issues with the following code-Im not sure if its reading the fil.pdf
Main issues with the following code-Im not sure if its reading the fil.pdfaonesalem
 
Cis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential filesCis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential filesCIS321
 
[10] Write a Java application which first reads data from the phoneb.pdf
[10] Write a Java application which first reads data from the phoneb.pdf[10] Write a Java application which first reads data from the phoneb.pdf
[10] Write a Java application which first reads data from the phoneb.pdfarchiespink
 
Input output files in java
Input output files in javaInput output files in java
Input output files in javaKavitha713564
 
In JavaWrite a program that reads a file and counts how many line.pdf
In JavaWrite a program that reads a file and counts how many line.pdfIn JavaWrite a program that reads a file and counts how many line.pdf
In JavaWrite a program that reads a file and counts how many line.pdfsuresh640714
 
Linux lesson
Linux lesson Linux lesson
Linux lesson mutharam
 
cminiproject-151115084708-lva1-app6892.pdf
cminiproject-151115084708-lva1-app6892.pdfcminiproject-151115084708-lva1-app6892.pdf
cminiproject-151115084708-lva1-app6892.pdfTasnimAbida
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook applicationsvrohith 9
 
PAGE 1Input output for a file tutorialStreams and File IOI.docx
PAGE  1Input output for a file tutorialStreams and File IOI.docxPAGE  1Input output for a file tutorialStreams and File IOI.docx
PAGE 1Input output for a file tutorialStreams and File IOI.docxalfred4lewis58146
 
Cosc 1436 java programming/tutorialoutlet
Cosc 1436 java programming/tutorialoutletCosc 1436 java programming/tutorialoutlet
Cosc 1436 java programming/tutorialoutletWoodardz
 

Similar to Simple java programTopic Binary File IOCreate a simple applic.pdf (20)

Use Java to program the following.1. Create public java class name.pdf
Use Java to program the following.1. Create public java class name.pdfUse Java to program the following.1. Create public java class name.pdf
Use Java to program the following.1. Create public java class name.pdf
 
Program reads in a file of phone numbers without area codes .pdf
Program reads in a file of phone numbers without area codes  .pdfProgram reads in a file of phone numbers without area codes  .pdf
Program reads in a file of phone numbers without area codes .pdf
 
T1
T1T1
T1
 
Question 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdfQuestion 1 has already been posted to Chegg and I am waiting for the.pdf
Question 1 has already been posted to Chegg and I am waiting for the.pdf
 
Discovering Windows Phone 8 Artifacts and Secrets
Discovering Windows Phone 8 Artifacts and Secrets Discovering Windows Phone 8 Artifacts and Secrets
Discovering Windows Phone 8 Artifacts and Secrets
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and FuncCSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
CSE 1310 – Spring 21Introduction to ProgrammingLab 4 Arrays and Func
 
Main issues with the following code-Im not sure if its reading the fil.pdf
Main issues with the following code-Im not sure if its reading the fil.pdfMain issues with the following code-Im not sure if its reading the fil.pdf
Main issues with the following code-Im not sure if its reading the fil.pdf
 
Cis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential filesCis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential files
 
[10] Write a Java application which first reads data from the phoneb.pdf
[10] Write a Java application which first reads data from the phoneb.pdf[10] Write a Java application which first reads data from the phoneb.pdf
[10] Write a Java application which first reads data from the phoneb.pdf
 
lec1.docx
lec1.docxlec1.docx
lec1.docx
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
 
In JavaWrite a program that reads a file and counts how many line.pdf
In JavaWrite a program that reads a file and counts how many line.pdfIn JavaWrite a program that reads a file and counts how many line.pdf
In JavaWrite a program that reads a file and counts how many line.pdf
 
Linux lesson
Linux lesson Linux lesson
Linux lesson
 
File Handling.pptx
File Handling.pptxFile Handling.pptx
File Handling.pptx
 
cminiproject-151115084708-lva1-app6892.pdf
cminiproject-151115084708-lva1-app6892.pdfcminiproject-151115084708-lva1-app6892.pdf
cminiproject-151115084708-lva1-app6892.pdf
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
PAGE 1Input output for a file tutorialStreams and File IOI.docx
PAGE  1Input output for a file tutorialStreams and File IOI.docxPAGE  1Input output for a file tutorialStreams and File IOI.docx
PAGE 1Input output for a file tutorialStreams and File IOI.docx
 
Cosc 1436 java programming/tutorialoutlet
Cosc 1436 java programming/tutorialoutletCosc 1436 java programming/tutorialoutlet
Cosc 1436 java programming/tutorialoutlet
 
Project report
Project reportProject report
Project report
 

More from arkurkuri

Find an artticle or advertisment that exemplifies the use of the sta.pdf
Find an artticle or advertisment that exemplifies the use of the sta.pdfFind an artticle or advertisment that exemplifies the use of the sta.pdf
Find an artticle or advertisment that exemplifies the use of the sta.pdfarkurkuri
 
A researcher is studying the mean weight of a killer whale. She coll.pdf
A researcher is studying the mean weight of a killer whale. She coll.pdfA researcher is studying the mean weight of a killer whale. She coll.pdf
A researcher is studying the mean weight of a killer whale. She coll.pdfarkurkuri
 
Date Due Feb 8. 2017 Students Name Please name and fill in t.pdf
Date Due Feb 8. 2017 Students Name Please name and fill in t.pdfDate Due Feb 8. 2017 Students Name Please name and fill in t.pdf
Date Due Feb 8. 2017 Students Name Please name and fill in t.pdfarkurkuri
 
Compare and contrast passive transport and active transport Compare .pdf
Compare and contrast passive transport and active transport  Compare .pdfCompare and contrast passive transport and active transport  Compare .pdf
Compare and contrast passive transport and active transport Compare .pdfarkurkuri
 
42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf
42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf
42. What does a coefficient of correlation of 0.70 infer A) Almost .pdfarkurkuri
 
4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf
4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf
4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdfarkurkuri
 
Use the given information to find the values of sin 2theta. cos2theta.pdf
Use the given information to find the values of sin 2theta. cos2theta.pdfUse the given information to find the values of sin 2theta. cos2theta.pdf
Use the given information to find the values of sin 2theta. cos2theta.pdfarkurkuri
 
What is the command to transfer the file stored in ~lab3README fro.pdf
What is the command to transfer the file stored in ~lab3README fro.pdfWhat is the command to transfer the file stored in ~lab3README fro.pdf
What is the command to transfer the file stored in ~lab3README fro.pdfarkurkuri
 
2.51. Why does earth have seasons2. What is the origin of the t.pdf
2.51. Why does earth have seasons2. What is the origin of the t.pdf2.51. Why does earth have seasons2. What is the origin of the t.pdf
2.51. Why does earth have seasons2. What is the origin of the t.pdfarkurkuri
 
Write the product as a sum or difference. Write the product as a sum.pdf
Write the product as a sum or difference. Write the product as a sum.pdfWrite the product as a sum or difference. Write the product as a sum.pdf
Write the product as a sum or difference. Write the product as a sum.pdfarkurkuri
 
Which osmotic and ionic strategies must marine teleost fishes employ.pdf
Which osmotic and ionic strategies must marine teleost fishes employ.pdfWhich osmotic and ionic strategies must marine teleost fishes employ.pdf
Which osmotic and ionic strategies must marine teleost fishes employ.pdfarkurkuri
 
What types of social and culture trends affect REISolution1. .pdf
What types of social and culture trends affect REISolution1. .pdfWhat types of social and culture trends affect REISolution1. .pdf
What types of social and culture trends affect REISolution1. .pdfarkurkuri
 
Which of the following are in the order Primates (Multiple answers).pdf
Which of the following are in the order Primates (Multiple answers).pdfWhich of the following are in the order Primates (Multiple answers).pdf
Which of the following are in the order Primates (Multiple answers).pdfarkurkuri
 
What are the issues and benefits of employing older workers Wh.pdf
What are the issues and benefits of employing older workers Wh.pdfWhat are the issues and benefits of employing older workers Wh.pdf
What are the issues and benefits of employing older workers Wh.pdfarkurkuri
 
What is current I1What is current I2What is current I3 14 V 1.pdf
What is current I1What is current I2What is current I3 14 V 1.pdfWhat is current I1What is current I2What is current I3 14 V 1.pdf
What is current I1What is current I2What is current I3 14 V 1.pdfarkurkuri
 
Use your thoughts about the essay, , and your own reflections on y.pdf
Use your thoughts about the essay, , and your own reflections on y.pdfUse your thoughts about the essay, , and your own reflections on y.pdf
Use your thoughts about the essay, , and your own reflections on y.pdfarkurkuri
 
12-1 Group Work Preliminary and Program Development ResearchPurp.pdf
12-1 Group Work Preliminary and Program Development ResearchPurp.pdf12-1 Group Work Preliminary and Program Development ResearchPurp.pdf
12-1 Group Work Preliminary and Program Development ResearchPurp.pdfarkurkuri
 
This homework consists of 8 problems. The first 7ask that .pdf
This homework consists of 8 problems. The first 7ask that .pdfThis homework consists of 8 problems. The first 7ask that .pdf
This homework consists of 8 problems. The first 7ask that .pdfarkurkuri
 
this is verilog HDL classWhat are the basic components of a module.pdf
this is verilog HDL classWhat are the basic components of a module.pdfthis is verilog HDL classWhat are the basic components of a module.pdf
this is verilog HDL classWhat are the basic components of a module.pdfarkurkuri
 
The Hox genes are responsible for determining the anterior-posterior.pdf
The Hox genes are responsible for determining the anterior-posterior.pdfThe Hox genes are responsible for determining the anterior-posterior.pdf
The Hox genes are responsible for determining the anterior-posterior.pdfarkurkuri
 

More from arkurkuri (20)

Find an artticle or advertisment that exemplifies the use of the sta.pdf
Find an artticle or advertisment that exemplifies the use of the sta.pdfFind an artticle or advertisment that exemplifies the use of the sta.pdf
Find an artticle or advertisment that exemplifies the use of the sta.pdf
 
A researcher is studying the mean weight of a killer whale. She coll.pdf
A researcher is studying the mean weight of a killer whale. She coll.pdfA researcher is studying the mean weight of a killer whale. She coll.pdf
A researcher is studying the mean weight of a killer whale. She coll.pdf
 
Date Due Feb 8. 2017 Students Name Please name and fill in t.pdf
Date Due Feb 8. 2017 Students Name Please name and fill in t.pdfDate Due Feb 8. 2017 Students Name Please name and fill in t.pdf
Date Due Feb 8. 2017 Students Name Please name and fill in t.pdf
 
Compare and contrast passive transport and active transport Compare .pdf
Compare and contrast passive transport and active transport  Compare .pdfCompare and contrast passive transport and active transport  Compare .pdf
Compare and contrast passive transport and active transport Compare .pdf
 
42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf
42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf
42. What does a coefficient of correlation of 0.70 infer A) Almost .pdf
 
4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf
4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf
4. On an illegal wolf ranch in Wyoming, gray wolves are bred and sol.pdf
 
Use the given information to find the values of sin 2theta. cos2theta.pdf
Use the given information to find the values of sin 2theta. cos2theta.pdfUse the given information to find the values of sin 2theta. cos2theta.pdf
Use the given information to find the values of sin 2theta. cos2theta.pdf
 
What is the command to transfer the file stored in ~lab3README fro.pdf
What is the command to transfer the file stored in ~lab3README fro.pdfWhat is the command to transfer the file stored in ~lab3README fro.pdf
What is the command to transfer the file stored in ~lab3README fro.pdf
 
2.51. Why does earth have seasons2. What is the origin of the t.pdf
2.51. Why does earth have seasons2. What is the origin of the t.pdf2.51. Why does earth have seasons2. What is the origin of the t.pdf
2.51. Why does earth have seasons2. What is the origin of the t.pdf
 
Write the product as a sum or difference. Write the product as a sum.pdf
Write the product as a sum or difference. Write the product as a sum.pdfWrite the product as a sum or difference. Write the product as a sum.pdf
Write the product as a sum or difference. Write the product as a sum.pdf
 
Which osmotic and ionic strategies must marine teleost fishes employ.pdf
Which osmotic and ionic strategies must marine teleost fishes employ.pdfWhich osmotic and ionic strategies must marine teleost fishes employ.pdf
Which osmotic and ionic strategies must marine teleost fishes employ.pdf
 
What types of social and culture trends affect REISolution1. .pdf
What types of social and culture trends affect REISolution1. .pdfWhat types of social and culture trends affect REISolution1. .pdf
What types of social and culture trends affect REISolution1. .pdf
 
Which of the following are in the order Primates (Multiple answers).pdf
Which of the following are in the order Primates (Multiple answers).pdfWhich of the following are in the order Primates (Multiple answers).pdf
Which of the following are in the order Primates (Multiple answers).pdf
 
What are the issues and benefits of employing older workers Wh.pdf
What are the issues and benefits of employing older workers Wh.pdfWhat are the issues and benefits of employing older workers Wh.pdf
What are the issues and benefits of employing older workers Wh.pdf
 
What is current I1What is current I2What is current I3 14 V 1.pdf
What is current I1What is current I2What is current I3 14 V 1.pdfWhat is current I1What is current I2What is current I3 14 V 1.pdf
What is current I1What is current I2What is current I3 14 V 1.pdf
 
Use your thoughts about the essay, , and your own reflections on y.pdf
Use your thoughts about the essay, , and your own reflections on y.pdfUse your thoughts about the essay, , and your own reflections on y.pdf
Use your thoughts about the essay, , and your own reflections on y.pdf
 
12-1 Group Work Preliminary and Program Development ResearchPurp.pdf
12-1 Group Work Preliminary and Program Development ResearchPurp.pdf12-1 Group Work Preliminary and Program Development ResearchPurp.pdf
12-1 Group Work Preliminary and Program Development ResearchPurp.pdf
 
This homework consists of 8 problems. The first 7ask that .pdf
This homework consists of 8 problems. The first 7ask that .pdfThis homework consists of 8 problems. The first 7ask that .pdf
This homework consists of 8 problems. The first 7ask that .pdf
 
this is verilog HDL classWhat are the basic components of a module.pdf
this is verilog HDL classWhat are the basic components of a module.pdfthis is verilog HDL classWhat are the basic components of a module.pdf
this is verilog HDL classWhat are the basic components of a module.pdf
 
The Hox genes are responsible for determining the anterior-posterior.pdf
The Hox genes are responsible for determining the anterior-posterior.pdfThe Hox genes are responsible for determining the anterior-posterior.pdf
The Hox genes are responsible for determining the anterior-posterior.pdf
 

Recently uploaded

Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxCeline George
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 

Recently uploaded (20)

Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 

Simple java programTopic Binary File IOCreate a simple applic.pdf

  • 1. Simple java program: Topic: Binary File I/O Create a simple application called contact list that will accept a person’s first and last name from a dialog box, the accept a phone number from a dialog box. Now save that information to a binary file. You’ll only have one record. ---------------------------- Next, Go back to your contact list application modify it such that that will accept a person’s first and last name from a dialog box, then accept a phone number from a dialog box. It will repeat this process until the user types in some sentinel value (terminating value) for name. If the file doesn’t exist currently, you’ll create a new file. If it does, you’ll append to it. Solution public class SimpleJava { string first,last, phone; publicstaticvoid main(String[] args) throws Exception { String first = System.console().readLine(); DataOutputStream out = openOutputStream("binary"); while(!first.equals("Terminate")) { String last = System.console().readLine(); String phone = System.console().readLine(); out.writeUTF(first+last+phone); String first = System.console.readline(); } } }