1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marysya12 [62]
3 years ago
5

Given an initialized string variable filename write a sequence of statements that append the line all is well to the file whose

name is given by the variable make sure that the data written to the file has been flushed from its buffer and that any system resources used during the course of running these statements have been released. Do not concern yourself with any possible exceptions here—assume they are handled elsewhere.
Computers and Technology
1 answer:
LekaFEV [45]3 years ago
6 0

Answer:

Details below...

Explanation:

import java.io.*;  

import java.util.Locale;  

//program to demonstrate PrintWriter  

class PrintWriterDemo {  

public static void main(String[] args)  

 {  

 String s="GeeksforGeeks";  

 // create a new writer  

 PrintWriter out = new PrintWriter(System.out);  

 char c[]={'G','E','E','K'};  

 

 //illustrating print(boolean b) method

 out.print(true);  

 

 //illustrating print(int i) method  

 out.print(1);  

 

 //illustrating print(float f) method  

 out.print(4.533f);  

 

 //illustrating print(String s) method  

 out.print("GeeksforGeeks");  

 out.println();  

 

 //illustrating print(Object Obj) method  

 out.print(out);  

 out.println();  

 

 //illustrating append(CharSequence csq) method  

 out.append("Geek");  

 out.println();  

 

 //illustrating checkError() method  

 out.println(out.checkError());  

 

 //illustrating format() method  

 out.format(Locale.UK, "This is my %s program", s);  

 

 //illustrating flush method  

 out.flush();  

 

 //illustrating close method  

 out.close();  

}  

}  

You might be interested in
4.8% complete this is a single choice question; skip ahead to question content a b c d confirm difficulty level: moderate an int
PilotLPTM [1.2K]

Answer:

A replay attack

4 0
2 years ago
How does computer applications affect our lives daily? 1- paragraph (4 sentences)
Mnenie [13.5K]

Answer:

Computers affect our lives daily because we use them everyday to browse the internet and solve problems in real life. They help solve problems and without them, getting certain information would be much harder. They help us interact with friends from anywhere in the world and communicate with relatives. It has also helped us during this pandemic and lets us learn from school in the safety of our own home.

( hope this helps, i wrote it myself ;-; )

4 0
3 years ago
Read 2 more answers
What command would you use to copy the content of a file named report1 to another called report1uc. Convert the content of repor
Ray Of Light [21]

Answer:

Answered below.

Explanation:

This answer is applicable to Linux.

There are several commands for copying files in Linux. cp and rsync are the most widely used. cp though, is the command used to copy files and their contents.

To copy a file named report1.txt to another file named report1uc.txt in the current directory, the following command is run.

$ cp report1.txt report1uc.txt

You can change the case of the strings in the file by using the tr command.

tr [:lower:] [:upper:]

For example,

$ echo brainly | tr [:lower:]. [:upper:]

Result is BRAINLY.

7 0
3 years ago
An organization is implementing a preselected baseline of security controls, but finds not all of the controls apply. What shoul
WINSTONCH [101]

The answer is Tailoring the baseline to their needs.

After an organization selects applicable security control baseline but finds not all of the controls apply, it initiates a tailoring process to modify the controls appropriately and more closely with specific conditions related to organizational missions, information systems or environments of operation. It is an integral part of the security control selection and specification and involves risk management processes like assessing, responding to, and framing.

8 0
4 years ago
Create a class named Employee. The class must contain member variables for the employee name and salary. It should contain gette
Lerok [7]

Answer:

Explanation:

The following code was written in Java. The code contains the Employee class which contains the two variables (name, salary), the constructor, getter and setter methods for both variables, and an overwritten toString method. It also contains a tester class with the main method inside and creates a Employee object and initializes it. Then it calls the toString method. The output can be seen in the attached image below. Due to technical difficulties I have added the code as a txt file below.

8 0
3 years ago
Other questions:
  • Please answer fast screenshot included - thanks in advance
    11·1 answer
  • A ________ is a collection of forms, reports, queries, and programs that serves as an intermediary between users and database da
    6·1 answer
  • Why should you not perform any personal grooming task while driving?
    5·2 answers
  • By using the search functionality within a twitter stream, users can filter for:
    9·1 answer
  • What is a computer dedicated to a single function, such as a calculator or computer game? A. TabletB. PDAC.ApplianceD. Minicompu
    6·1 answer
  • describe a situation in which peer pressure could cause a serious problem for safe driving, and how you could resist the peer pr
    8·2 answers
  • A ____________ is a collection of commands given a name.
    11·1 answer
  • A specialized output device for producing charts, maps, and very high-quality drawings is
    5·1 answer
  • Which factor affects reading speed the most?
    9·1 answer
  • The users, groups, and roles that have access to a server are called ______________________________.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!