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
AveGali [126]
3 years ago
12

Given an initialized String variable outfile, write a statement that declares a PrintWriter reference variable named output and

initializes it to a reference to a newly created PrintWriter object associated with a file whose name is given by outfile.
Computers and Technology
1 answer:
Zina [86]3 years ago
5 0

Answer:

PrintWriter output=new PrintWriter(outfile);

Explanation:

In object oriented programming, the statement PrintWriter output=new PrintWriter(outfile); creates an object of the class PrintWriter this object is the reference variable called output. and it is assigned the string variable outfile. The object output can then be used to access other methods and fields of the class PrintWriter using the dot notation (or operator)

You might be interested in
write a C program the prints out the size of variables with the following C data types- int, long, unsigned, long long, double,
Anit [1.1K]

<u>C program for finding size of different data types</u>

#include <stdio.h>

//driver function

int main()

{

   int a;  //declaring a of type int

   float b; //declaring b of type float

   double c; //declaring c of type double

   char d; //declaring d of type char

   long e; //declaring e of type long

   long long f; //declaring f of type longlong

   unsigned g; //declaring g of type unsigned

   // Sizeof operator is used to evaluate the size of a variable

printf(" int data type contains: %lu bytes\n",sizeof(a));/*Finding size of int */

printf("float data type contains : %lu bytes\n",sizeof(b));/*Finding size of float */

printf("double data type contains: %lu bytes\n",sizeof(c));/*Finding size of double */

printf("char data type contains: %lu byte\n",sizeof(d));/*Finding size of char */

printf("long data type contains: %lu byte\n",sizeof(e));/*Finding size of long*/ printf("longlong data type contains: %lu byte\n",sizeof(f));/*Finding size of longlong */

printf("unsigned data type contains: %lu byte\n",sizeof(g)); /*Finding size of unsigned */

   return 0;

}

<u>Output</u>

int data type contains: 4 bytes

float data type contains : 4 bytes

double data type contains: 8 bytes

char data type contains: 1 byte

long data type contains: 8 byte

longlong data type contains: 8 byte

unsigned data type contains: 4 byte

4 0
3 years ago
I am trying to write a c++ program like the game typeracer. When the player starts the program he will be asked to write a sente
murzikaleks [220]
Http://www.cprogramming.com/tutorial/string.html

--------------------------------------------------------------------
6 0
3 years ago
The Moon appears to be red in color during a total lunar eclipse because of the way light waves pass through Earth’s ___________
Marysya12 [62]

Answer bro must have a mental disorder its like ur thumb HEAT WAVES the  moon becomes red bc of heat waves didnt u say that anyways???

Explanation:

8 0
2 years ago
Read 2 more answers
I want to be a astrophysicist but my parents want me to be a software engineer. whuch one is better?
Andreas93 [3]
You need to discover yourself which one you love to do. Software Engineering is just science and math, programming languages and too much work, but it’s the job of this era. It’s very very desirable and one of the highest salaries in US.
7 0
2 years ago
Match the feature to the network architecture,
pochemuha

Answer:

Answer is:  

Client-Server Network

  • expensive to set up
  • has a central server
  • easy to track files
  • useful for a large organization

Peer-to-peer Network

  • useful for a small organization
  • difficult to track files
  • inexpensive to set up
  • does not have a central server

Explanation:

<em>Client-Server Network is ideal for bigger network set up like offices and companies where there will be a central server involved with several clients to access and connected with the server. This is the normal network set up to companies. While, Peer to peer network is ideal for much smaller network, which consists of only two computers to communicate and share files. This network is normally temporary and inexpensive since in only works with two computers.</em>

7 0
3 years ago
Other questions:
  • What device brocasts all data packets to other nodes on a network?
    5·1 answer
  • One of the difficult decisions a systems analyst has to make when it comes to software is whether to recommend making, buying, o
    8·1 answer
  • This is a list of commands that tell your computer what to do. A icon B FAT C GUI D menu
    5·2 answers
  • Each processor core on a multi core processor generally runs faster than a single core processor
    14·2 answers
  • Difference between a software package and Integrated software and why users would choose one over the other
    8·1 answer
  • The Office ____ is a temporary storage area. Warehouse Clipboard Storehouse Gallery
    15·1 answer
  • Write a summary of five things that you learned about CSS. Do not copy and paste the information. Summarize each point in your o
    5·1 answer
  • Group of programs are software ​
    6·2 answers
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
  • Jason Chang is creating photos of his restaurant for a new website. Some of the photos of the staff have red eye, others are bad
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!