SlideShare a Scribd company logo
Write a line of code to create a Print Writer to write to the file "out.txt", and then another line
that writes your name to the opened file. Do not worry about the try-catch.
Solution
PrintWriter pw = new PrintWriter(new File("out.txt"));
pw.println("The Dark passenger");
// complete code:
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
public class vehicle {
public static void main(String args[]) throws FileNotFoundException{
PrintWriter pw = new PrintWriter(new File("out.txt"));
pw.println("The Dark passenger");
pw.close();
}
}

More Related Content

PDF
In practice, a RAM is used to simulate the operation of a stack by m.pdf
PDF
i need help to edit the two methods below so that i can have them wo.pdf
PDF
Help!! Which of the following correctly lists the simple molecules t.pdf
PDF
How does feasibility differ in an agile environment in comparison to.pdf
PDF
describe a real-life example of selection against a homozygous reces.pdf
PDF
Define a motor unit. What roles do motor units play in graded contrac.pdf
PDF
An antibody is a protein that has which level of protein structure .pdf
PDF
C++ PROGRAMThis program builds on the code below#include iostr.pdf
In practice, a RAM is used to simulate the operation of a stack by m.pdf
i need help to edit the two methods below so that i can have them wo.pdf
Help!! Which of the following correctly lists the simple molecules t.pdf
How does feasibility differ in an agile environment in comparison to.pdf
describe a real-life example of selection against a homozygous reces.pdf
Define a motor unit. What roles do motor units play in graded contrac.pdf
An antibody is a protein that has which level of protein structure .pdf
C++ PROGRAMThis program builds on the code below#include iostr.pdf

More from irshadoptical (20)

PDF
You are in charge of the investigation regarding possible exposur.pdf
PDF
Which of the following is not a product of the light reactions of ph.pdf
PDF
what is the difference bettween cotranslational import and posttrans.pdf
PDF
What is the meaning of critical periods in neonatal development Wha.pdf
PDF
What are the major differences between foreign bonds and Eurobonds .pdf
PDF
What is meant by ecological fallacySolutionAnswerThe term .pdf
PDF
What are the two main branches of Non-Euclidean Geometry What is the.pdf
PDF
By what transport method does oxygen enter the blood from the alveol.pdf
PDF
All of these are examples of evidence used to support the hypothesis.pdf
PDF
A 28 year-old biologist makes a trip to study life forms in a distan.pdf
PDF
4. Name the following compounds CO2 CH CH3 CH20H CH3COOH 5. Water ha.pdf
PDF
4. When examining whether group differences occur on more than one d.pdf
PDF
2. Discuss possible sources of narrowband interference. What techniq.pdf
PDF
1. Zac Richardson, CPA, has a stack of 22 tax returns to complete be.pdf
PDF
tissue that functioning in communication are a. nerve tissue b. musc.pdf
PDF
The students at a local high school were assigned to do a project fo.pdf
PDF
The significance of a notochord in the evolution of chordates is that.pdf
PDF
since leukocytes and erythrocytes are produced from the same precurs.pdf
PDF
Show that a star-shaped open subset of the plane is connected.So.pdf
PDF
send EDITED code pleaseBattleship.javapackage part3;public cla.pdf
You are in charge of the investigation regarding possible exposur.pdf
Which of the following is not a product of the light reactions of ph.pdf
what is the difference bettween cotranslational import and posttrans.pdf
What is the meaning of critical periods in neonatal development Wha.pdf
What are the major differences between foreign bonds and Eurobonds .pdf
What is meant by ecological fallacySolutionAnswerThe term .pdf
What are the two main branches of Non-Euclidean Geometry What is the.pdf
By what transport method does oxygen enter the blood from the alveol.pdf
All of these are examples of evidence used to support the hypothesis.pdf
A 28 year-old biologist makes a trip to study life forms in a distan.pdf
4. Name the following compounds CO2 CH CH3 CH20H CH3COOH 5. Water ha.pdf
4. When examining whether group differences occur on more than one d.pdf
2. Discuss possible sources of narrowband interference. What techniq.pdf
1. Zac Richardson, CPA, has a stack of 22 tax returns to complete be.pdf
tissue that functioning in communication are a. nerve tissue b. musc.pdf
The students at a local high school were assigned to do a project fo.pdf
The significance of a notochord in the evolution of chordates is that.pdf
since leukocytes and erythrocytes are produced from the same precurs.pdf
Show that a star-shaped open subset of the plane is connected.So.pdf
send EDITED code pleaseBattleship.javapackage part3;public cla.pdf

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
master seminar digital applications in india
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Presentation on HIE in infants and its manifestations
PPTX
Cell Types and Its function , kingdom of life
PPTX
Lesson notes of climatology university.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Institutional Correction lecture only . . .
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
RMMM.pdf make it easy to upload and study
Cell Structure & Organelles in detailed.
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
Classroom Observation Tools for Teachers
human mycosis Human fungal infections are called human mycosis..pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Complications of Minimal Access Surgery at WLH
Final Presentation General Medicine 03-08-2024.pptx
Microbial disease of the cardiovascular and lymphatic systems
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
master seminar digital applications in india
A systematic review of self-coping strategies used by university students to ...
Presentation on HIE in infants and its manifestations
Cell Types and Its function , kingdom of life
Lesson notes of climatology university.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Institutional Correction lecture only . . .
Microbial diseases, their pathogenesis and prophylaxis
RMMM.pdf make it easy to upload and study

Write a line of code to create a Print Writer to write to the file .pdf

  • 1. Write a line of code to create a Print Writer to write to the file "out.txt", and then another line that writes your name to the opened file. Do not worry about the try-catch. Solution PrintWriter pw = new PrintWriter(new File("out.txt")); pw.println("The Dark passenger"); // complete code: import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; public class vehicle { public static void main(String args[]) throws FileNotFoundException{ PrintWriter pw = new PrintWriter(new File("out.txt")); pw.println("The Dark passenger"); pw.close(); } }