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
almond37 [142]
3 years ago
5

Public class Question4

Computers and Technology
1 answer:
enyata [817]3 years ago
4 0

Answer:

See explaination

Explanation:

import java.io.File;

import java.io.PrintWriter;

public class Question4 {

/*

* For this exercise you will be doing some basic operations to write to a

* file. You will be creating your very own Secrets of the Universe (TM)

*

* You can use the PrintWriter class to write to files (Chapter 11.4)

*

* Your code should perform the following actions:

*

* 1) Open/Create a file for writing at the following location:

* "files/question4/MySecretsOfTheUniverse.txt" If the file already exists

* you will want to overwrite its contents. 2) Add at least 3 of your own

* secrets of the universe to the file. Each secret should be on its own

* line. 3) Make sure to close your file so that the results are saved.

*

* Note: Your code should not throw any checked exceptions.Note: You will

* need to import some classes from the java.io package.

*/

public static void Question4() {

// creating a File object

File file = new File("files/question4/MySecretsOfTheUniverse.txt");

try {

// opening print writer to write to the file. the file will be

// created if not exist, but you have to ensure that the directory

// files/question4/ exists.

PrintWriter writer = new PrintWriter(file);

// writing three random statements to the file. I dont know anything

// about the secrets of universe you mentioned, so I'm just writing

// some random stuff that came into my mind. You can replace below

// lines with whatever you want to write.

writer.println("Humans are aliens from Mars, sent here to colonize Earth after they screwed up mars.");

writer.println("This universe and everything in it are probably brain cells of some huge cosmic organism.");

writer.println("There may be other forms of life co-exist here on our Earth that we can't see,"

+ " because they vibrate at a different frequency outside of all our measurements");

//closing file, saving changes

writer.close();

} catch (Exception e) {

//printing error if exception is occurred.

System.err.println(e);

}

}

public static void main(String[] args) {

Question4();

}

}

You might be interested in
What are the steps for creating a bookmark? 1. Place the insertion point where the bookmark should appear. 2. Click the tab. 3.
Paladinen [302]

Answer:

2. Insert

3. Links

4. Add

6. Advanced

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

A website refers to the collective name used to describe series of web pages linked together with the same domain name.

On the other hand, a webpage is the individual HTML document (single page) that makes up a website with a unique uniform resource locator (URL).

A bookmark can be defined as a placeholder or saved shortcut for a webpage and for future reference. Thus, it avails an end user the ability to quickly access a bookmarked webpage by automatically directing the web browser to the webpage.

Basically, the steps for creating a bookmark are;

1. The insertion point of the webpage should be placed at the point where the bookmark should appear.

2. Click the "INSERT" tab.

3. In the "LINKS" group, click "Bookmark"

4. When a dialog box opens, the bookmark should be named with a specific title, and then click "ADD"

5. To see bookmarks within the HTML document, you should go to Backstage view and click on "Options"

6. In ADVANCED, select Show Bookmarks to have them appear as a locked cursor within the HTML document.

6 0
3 years ago
Mainframe computers are multi-programming, high-performance computers, and multi-user, which means it can handle the workload of
Vilka [71]

Answer:

a. True

Explanation:

A computer can be defined as an electronic device that is capable of receiving of data in its raw form as input and processes these data into information that could be used by an end user. Computers can be classified on the basis of their size and capacity as follows;

I. Supercomputers.

II. Mainframe computers.

III. Mini computers.

IV. Micro computers.

Mainframe computers were developed and introduced in the early 1950s.

Mainframe computers are specifically designed to be used for performing multi-programming because they are high-performance computers with the ability to handle multiple users. As a result, it simply means that mainframe computers can be used to effectively and efficiently perform the work of over one hundred (100) users at a time on the computer. Some examples of mainframe computers include the following; IBM Es000 series, CDC 6600 and ICL39 Series.

Furthermore, mainframe computers are mostly or commonly used by large companies, business firms or governmental institutions for performing various complex tasks such as census, financial transactions, e-commerce, data sequencing, enterprise resource planning, etc.

8 0
3 years ago
Read 2 more answers
In 1997, two South Korean manufacturers of semiconductors, LG Semicon and Hyundai Electronics, were accused of selling dynamic r
KatRina [158]

Answer:

<em>d. dumping.</em>

Explanation:

In international trade, dumping is described loosely as <em>selling products on  a foreign market below their manufacturing expenses or selling products on  a foreign market below their ' reasonable ' market value</em>.

It is a form of injury pricing, a difference in cost aimed at harming the competition.

4 0
3 years ago
A weak fuel to air mixture along with normal airflow through a turbine engine may result in?
Sladkaya [172]

Answer:

A weak fuel to air mixture along with normal airflow through a turbine engine may result in <u>a lean die out</u>.

Explanation:

Lean die out is a type of problem that may occur in the turbine. This may result in the weak fuel to air mixture. In case if the mixture of fuel and air is getting low due to some reasons like leakage of gas or low speed of engine may result in dangerous conditions such as fire or blast in the turbine. This is called lean die out. In the result of this problem, the turbine can be burn with the blast and may leads to causalities.

5 0
4 years ago
Which type of computer application is apple keynote? a. word processor b. spreadsheet c. presentation d. database e. multimedia
Naily [24]

The type of computer application which apple keynote is, is: c. presentation.

<h3>What is a presentation application?</h3>

A presentation application can be defined as a type of computer application which is designed and developed to avail its end users an ability to create various slides that comprises both textual and multimedia information, which are typically used during a presentation.

This ultimately implies that, apple keynote is an example of a presentation application which is used on computers.

Read more on presentation application here: brainly.com/question/26404012

#SPJ4

4 0
2 years ago
Other questions:
  • Which keyboard feature is a form feed character?
    14·1 answer
  • What is the Multiplier if the change in RGDP is $525,000,000 and initial spending is $100,000?
    12·1 answer
  • Your client expresses that they want their new website to have a responsivedesign with consistent coding. They are concerned wit
    5·1 answer
  • When compared to defender and analyzer firms, early adopters of new technologies tend to be?
    13·2 answers
  • A user reports that nothing happens when he or she attempts to print from the computer at his desk. This points to a possible pr
    15·1 answer
  • Which descriptions offer examples of Correction Services workers? Select all that apply.
    8·1 answer
  • Represent the measuring unit ofcomputer un terms of fration of second​
    13·1 answer
  • Which of the following images illustrates safe driving?
    8·2 answers
  • . Imagine that you were programming without an IDE. What problems might you encounter?​
    12·1 answer
  • What is the first phase of the project process?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!