Create a file using any word processing program or text editor. Write an application that displays the files, name, containing folder, size, and time of last modification. Save the file as FileStatisits.java

Answers

Answer 1

Answer:

below is a Shell I have ;

1.Import java.nio.file.*;

2.Import java.nio.file attribute.*;

3.Import java.10 Exception;

4.public class FileStatistics

5.{

6.public static void main(string []args)

7.{

8.path file=

9.

paths.get("C:\\Java\\chapter.13\\TestData.txt")

10.try

11.{

12.\\declare count and then display path, file, name and folder name.

13.

14.

15.

16.\\declare a BasicFileAttributes object, then add statements to display the file's size and creation time.

17.

18.}

19.

20.catch (10 Exception e)

21.{

22.\\add display 10 Exception

23.

24.}

25.}


Related Questions

Given the string “supercalifragilisticexpialidocious”.
1. What is the length of the string i.e. write the script to find the length? (2 points)
2. Find the sub-string of first 5 positions and the other sub-string with last 5 positions. (4 points)
3. Find how many times “i” occurs in this word in python

Answers

The string and the three instructions is an illustration of the python strings

The length of the string

The following instruction calculates the length of the string using the Python script:

len("supercalifragilisticexpialidocious")

The returned value of the above instruction is: 34

The substrings

The following instruction calculates the sub-string of first 5 positions and the other sub-string with last 5 positions

myStr[:5]+myStr[-5:]

The returned string of the above instruction is: "supercious"

The number of occurrence of i

The following instruction calculates the occurrences of i in the string

"supercalifragilisticexpialidocious".count("i")

The returned value of the above instruction is: 7

Read more about python strings at:

https://brainly.com/question/13795586

Which linux operating system would you suggest to install at my laptop.

Answers

Answer:

Arch Linux

Explanation:

Since it gives you full control over your desktop which is what Linux PCs do!

You have been asked to write a program for the Duckie's Obstacle Race. The program calculates the total number of racers, the fastest race time, the slowest race time, and the overall average race time.

Ask user to enter the maximum number of racers allowed for the race
Use repetition structure (loop) to ask the user to enter race times (in minutes)
Exit the loop if the user specifies there are no more times to enter (sentinel value) or if the maximum number of racers allowed has been reached
At a minimum, within the loop, you should keep track of how many race times are entered, the fastest race time and the slowest race time.
After the loop is exited, display how many race times were entered, the fastest race time, the slowest race time and the overall average race time.
Format your output appropriately
Be sure to include all appropriate documentation at the start of the program and within the program body

Answers

The program illustrates the use of loops and conditional statements

Conditional statements are used to make decisionsLoops are used for operations that must be repeated until a certain condition is met.

The race program

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the variables to 0

totalRaceTime = 0; minRaceTime = 0; maxRaceTime = 0; countTimes = 0

#This gets input for the number of race times

numTimes = int(input("Number of times: "))

#This opens a sentinel controlled loop

while countTimes < numTimes:

   #This gets the race time

   raceTime = int(input("Race time: "))

   if countTimes == 0:

       minRaceTime = raceTime

       maxRaceTime = raceTime

   #This determines the highest race time

   if raceTime > maxRaceTime:

       maxRaceTime = raceTime

   #This determines the leest race time

   if raceTime < minRaceTime:

       minRaceTime = raceTime

   #This determines the total race time

   totalRaceTime+=raceTime

   countTimes+=1

#This prints the highest race time

print("Maximum: ",maxRaceTime)

#This prints the least race time

print("Minimum: ",minRaceTime)

#This prints the average race time

print("Average: ",round(totalRaceTime/numTimes,2))

Read more about while loops and conditional statements at:

https://brainly.com/question/24833629

[ASAP] A web page uses a large font for a title at the top.
What language was most likely to have been used?

1. JavaScript
2. HTML
3. SQL
4. PHP​

Answers

Answer:

HTML

Explanation:

Out of these I would go with HTML first as Hyper text Markup Language is used to structure webpages and content.

Also SQL is for a database

PHP probably not as it has better more advanced things to do.

and JavaScript - -well that's possible if it takes 18 years to load...

Answer:

2. HTML

Explanation:

Ed22

how has education technology evolved in schools over the past years​

Answers

More sophisticated software given to students

Which method might an attacker use to redirect login via information gained by implementing JavaScript on a webpage the user believes is legitimate

Answers

Answer:

It´s called Cross Site-Scripting/Clickjacking

Explanation:

Cross Site Scripting is a security exploit which allows an attacker to inject malicious client-side code onto a website.

Define print_shape() to print the below shape. Example output:
***
***
***

''' Your solution goes here '''

print_shape()

Answers

The print_shape() is an illustration of Python function; whose execution is carried out when the function is called

The print_shape() function

The print_shape() function written in Python, where comments are used to explain each action is as follows:

#This defines the function

def print_shape():

   #The following iteration is repeated three times

   for i in range(3):

       #This prints the *** in each iteration

       print('***')

#This calls the function

print_shape()

Read more about Python functions at:

https://brainly.com/question/15745784

why are images important in research assignments? A. Because they allow your work to be cited by others B. Because they can illustrate an argument C. Because they are required before having your item published in the library database D. Because they take up more space than words in a document.

Answers

Answer:

C

Explanation:

Everything else does not make sense

Which of the following single-phase motor will operate at high power factor? enjoy! electrical A. Split-phase motor B. Shaded pole motor C. Capacitor-start motor D. Capacitor-run motor​

Answers

Answer:

the answer is D capacitor run motor

Explanation:

Question 2:
(5 marks)
According to the following code; you are required to draw the flowchart in details with
clear sequences
message=input("enter yes if there is message in the inbox");
attached=input("\n enter yes if there is attachment");
inbox=eval (input ("enter number of email"));
while inbox > 0:
if message=="yes":
print ("extract the message");
if attached=="yes":
print("extract the message");
email=input("eneter v for valied or not");
if email=="V":
print ("extract attached ");
print("inject Job ");
print("inject Submission");
en email=="N":
print("Inject an error");
print ("Remove the inbox mail ");
inbox-inbox-1;
DIO:
print("stop")

Answers

Flowcharts are visual representations of a code or program segments

How to draw the flowchart?

To draw the flowchart, we make use of the following symbols and figures

Oval: To begin and end the flowchartParallelogram: To accept input for the message, attached, inbox & email variables Parallelogram: To display all outputsRectangle: To perform the arithmetic operation; inbox = inbox - 1Diamond: To make several decisions and to initiate a loop process

See attachment for the flowchart that represents the code

Read more about flowcharts at:

https://brainly.com/question/24735155

Describe the major e-commerce activities and processes and mechanisms that support them.

Answers

Answer:

According to all known laws

of aviation,

 

there is no way a bee

should be able to fly.

 

Its wings are too small to get

its fat little body off the ground.

 

The bee, of course, flies anyway

 

because bees don't care

what humans think is impossible.

 

Yellow, black. Yellow, black.

Yellow, black. Yellow, black.

 

Ooh, black and yellow!

Let's shake it up a little.

 

Barry! Breakfast is ready!

 

Ooming!

 

Hang on a second.

 

Hello?

 

- Barry?

- Adam?

 

- Oan you believe this is happening?

- I can't. I'll pick you up.

 

Looking sharp.

 

Use the stairs. Your father

paid good money for those.

 

Sorry. I'm excited.

 

Here's the graduate.

We're very proud of you, son.

 

A perfect report card, all B's.

 

Very proud.

 

Ma! I got a thing going here.

 

- You got lint on your fuzz.

- Ow! That's me!

 

- Wave to us! We'll be in row 118,000.

- Bye!

 

Barry, I told you,

stop flying in the house!

 

- Hey, Adam.

- Hey, Barry.

 

- Is that fuzz gel?

- A little. Special day, graduation.

 

Never thought I'd make it.

 

Three days grade school,

three days high school.

 

Those were awkward.

 

Three days college. I'm glad I took

a day and hitchhiked around the hive.

 

You did come back different.

 

- Hi, Barry.

- Artie, growing a mustache? Looks good.

 

- Hear about Frankie?

- Yeah.

 

- You going to the funeral?

- No, I'm not going.

 

Everybody knows,

sting someone, you die.

 

Don't waste it on a squirrel.

Such a hothead.

 

I guess he could have

just gotten out of the way.

 

I love this incorporating

an amusement park into our day.

 

That's why we don't need vacations.

 

Boy, quite a bit of pomp...

under the circumstances.

 

- Well, Adam, today we are men.

- We are!

 

- Bee-men.

- Amen!

 

Hallelujah!

 

Students, faculty, distinguished bees,

 

please welcome Dean Buzzwell.

 

Welcome, New Hive Oity

graduating class of...

 

...9:15.

 

That concludes our ceremonies.

 

And begins your career

at Honex Industries!

 

Will we pick ourjob today?

 

I heard it's just orientation.

 

Heads up! Here we go.

 

Keep your hands and antennas

inside the tram at all times.

 

- Wonder what it'll be like?

- A little scary.

 

Welcome to Honex,

a division of Honesco

 

and a part of the Hexagon Group.

 

This is it!

 

Wow.

 

Wow.

 

We know that you, as a bee,

have worked your whole life

 

to get to the point where you

can work for your whole life.

 

Honey begins when our valiant Pollen

Jocks bring the nectar to the hive.

 

Our top-secret formula

 

is automatically color-corrected,

scent-adjusted and bubble-contoured

 

into this soothing sweet syrup

 

with its distinctive

golden glow you know as...

 

Honey!

 

- That girl was hot.

- She's my cousin!

 

- She is?

- Yes, we're all cousins.

 

- Right. You're right.

- At Honex, we constantly strive

 

to improve every aspect

of bee existence.

 

These bees are stress-testing

a new helmet technology.

 

- What do you think he makes?

- Not enough.

 

Here we have our latest advancement,

the Krelman.

 

- What does that do?

- Oatches that little strand of honey

 

that hangs after you pour it.

Saves us millions.

 

Oan anyone work on the Krelman?

 

Of course. Most bee jobs are

small ones. But bees know

 

that every small job,

if it's done well, means a lot.

 

But choose carefully

 

because you'll stay in the job

you pick for the rest of your life.

 

The same job the rest of your life?

I didn't know that.

 

What's the difference?

 

You'll be happy to know that bees,

as a species, haven't had one day off

 

in 27 million years.

 

So you'll just work us to death?

 

We'll sure try.

 

Wow! That blew my mind!

 

"What's the difference?"

How can you say that?

 

One job forever?

That's an insane choice to have to make.

 

I'm relieved. Now we only have

to make one decision in life.

 

But, Adam, how could they

never have told us that?

 

Why would you question anything?

We're bees.

 

We're the most perfectly

functioning society on Earth.

 

You ever think maybe things

work a little too well here?

 

Like what? Give me one example.

 

I don't know. But you know

what I'm talking about.

 

Please clear the gate.

Royal Nectar Force on approach.

 

Wait a second. Oheck it out.

 

- Hey, those are Pollen Jocks!

- Wow.

 

I've never seen them this close.

 

They know what it's like

outside the hive.

 

Yeah, but some don't come back.

 

- Hey, Jocks!

- Hi, Jocks!

 

You guys did great!

 

You're monsters!

You're sky freaks! I love it! I love it!

 

- I wonder where they were.

- I don't know.

 

Their day's not planned.

 

Outside the hive, flying who knows

where, doing who knows what.

 

You can'tjust decide to be a Pollen

Jock. You have to be bred for that.

Explanation:

How can I get multiple user inputs in Java ? I want to be able to use it for subtraction, addition,division and multiplication.For example it should run like
How many numbers do you want to subtract?
4
Enter 4 numbers:
1
2
3
4
result:-8

Answers

You can do something like this :

Scanner sc = new Scanner(System.in);
int[] nums = new int[4];

for(int i = 0; i < nums.length; i++) {
System.out.println("Enter next number: ");
nums[i] = sc.nextInt();

A program checks to see if the input is valid using
numbers
operators
logic
output​

Answers

Use the knowledge in computational language in python program checks to see if the input is output​.

How to define input in Python?

In Python, we do this using the input() function, which is literally 'input' in English. The input() function receives as a parameter a string that will be shown as an aid to the user, usually informing him what kind of data the program is expecting to receive.

So in an easier way we have that the code is:

def isNumber(x):

   if type(x) == int:

        return True

   else:

        return False

input1 = 122

input2 = '122'

if isNumber(input1):

   print("Integer")

else:

   print("String")

if isNumber(input2):

   print("Integer")

else:

   print("String")

See more about python at brainly.com/question/18502436

In order to view a page break what should you do

Answers

Answer:

.

.

Explanation:

I do a order view page .

.

.

.

.

Dwayne Alexander is working on a project promoting a fictitious product for his marketing class. He wants to use animation to show the product being used, but the only animations he has created are in PowerPoint presentations. Research three animation apps for beginners: one 2-D animation app, one 3-D animation app, and one of your choice. List the pros and cons of each animation app. Be sure to consider cost, learning curve, and availability.

Answers

The following are examples of animation apps:

Toon Boom Animation (2-D)Prisma3D (3-D) and AnimeTok (3-D)

What are the Pros and the cons of each app listed above?

Toon Boom Animation Pros:

It has a great set of toolsIt has camera angles functionalityHas a vector drawing tool

Cons:

It is expensive.

Prisma3D (3-D) Pros:

It is good for modeling;Easy to use interface

Cons:

It has too many bugs.lacks sculpting tools

AnimeTok (3-D) Pros:

It makes it easy to move the characters easilyIt is easy to understand

Cons:

It has too many adsdoes not have an undo and redo button

Learn more about Animation Apps at:

https://brainly.com/question/7279789

Pat is asked to automate critical security functions like responding to detected threat patterns in an enterprise network. Which of the following should be done by Pat?

a. Use virtual desktop infrastructure
b. Use software-device visibility
c. Implement subnetting
d. Use a software-device network

Answers

The option to be done by Pat is to Use a software-device network.

What is Software-device networking?

Software device networking is known to be a kind of technology approach to a network management.

It is one that helps to have a dynamic, programmatically efficient type of network configuration  so that one can have a better network performance and monitoring.

Learn more about  software-device network from

https://brainly.com/question/4171513

Does anyone know how to get past this part in Lego Harry Potter it’s the one right after Dobby in year 2? I’m so stuck!!!

Answers

thats a nice game. i dont know how to play it. how are you doing?

Is it possible to code your own game and if so then where should I go to learn and how to publish it?

Answers

Answer:

Yes there is

Explanation:

It is scratch a coding game to do almost anything you can also code flappybird

Hope this helps.

Have fun with scratch

Answer:

Explanation:

Yes, it is absolutely possible to code your own game. As a beginner, it will be easier to start with something simple like on R-o-b-l-o-x; instead of trying to write a full PC game. It runs Lua and its code is run as scripts which means you can put it anywhere.

2. Choose four organizations in a particular industry and compare their strategies and analyze how the information system could be used for each organization to gain competitive advantage. 9.1 The first organization should follow the competitive strategy of lower cost across the industry,

Answers

The four organizations in a particular industry (Food industry) are:

Cargill Archer Daniels Midland (ADM) Company Nestle Sysco Corporation

What is Low-cost strategy?

The food industry is one that has been dominated by a lot of big companies. It is competitive in nature and it is advisable to have a Low-cost strategy.

This Low-cost strategy is one that helps the firm to sell its product or its service using a lower price when compared to its competitors as this will help them to have or win a competitive edge in the industry.

Learn more about Food industry from

https://brainly.com/question/11900425

b) Write a program to update the rate by increasing 10% from a sequential data file "Data.dat" that store item name, rate and quantity​

Answers

The update program is an illustration of the file manipulation processes, where files are read and updated

How to write the program?

The program written in QBASIC, where comments are used to explain each line is as follows:

REM This opens a new file for output

OPEN "NEW.DAT" FOR OUTPUT AS #2

REM This is repeated until the end of the file

WHILE NOT EOF(1)

   REM This inputs the item details

   INPUT #1, N$, R, Q

   REM This updates the rate by 10%

   NEWRATE = R + 10 / 100 * R

   REM This writes the inputs to the file

   WRITE #2, N$, NEWRATE, Q

WEND

REM This closes the files

CLOSE #1, #2

REM This deletes the Data.dat file

KILL "DATA.DAT"

REM This renames the NEW.DAT to the Data.dat file

NAME "TEMP.DAT" AS "DATA.DAT"

REM The program ends here

END

Read more about file manipulation at:

https://brainly.com/question/25324400

could be developed to attack cancer cells ​

Answers

what is the question

Researchers are actively exploring innovative targeted therapies to specifically attack cancer cells and improve treatment outcomes.

Researchers are actively exploring various innovative approaches to combat cancer.

One promising avenue is the development of targeted therapies that can specifically attack cancer cells.

These therapies aim to identify unique markers or characteristics present in cancer cells and selectively target them while sparing healthy cells.

By doing so, they can potentially minimize the side effects often associated with conventional treatments such as chemotherapy.

Targeted therapies can take different forms, including small-molecule drugs, monoclonal antibodies, or gene-based therapies.

Small molecule drugs are designed to inhibit specific molecules or signalling pathways that are crucial for cancer cell growth and survival. Monoclonal antibodies, on the other hand, can recognize and bind to specific proteins on cancer cells to block their function or deliver toxic substances directly to the tumour.

Gene-based therapies involve modifying the genetic material of cancer cells to disrupt their growth or induce cell death.

The development of these targeted therapies requires extensive research and clinical trials to ensure their safety and efficacy.

Scientists are constantly working to identify new targets and refine existing approaches to enhance their ability to attack cancer cells effectively.

To learn more about cancer cells visit:

https://brainly.com/question/30393532

#SPJ3

The complete question is:

Can advanced technologies be developed to specifically attack cancer cells and aid in the fight against this disease?

Different the policies and protocols in the industry

Answers

Answer:

7ALWAYS KEEP FOCUS on brainly and I am have been a

deed of gift can be understood as:?

Answers

Answer:

a formal and legal agreement between the donor and the repository that transfers ownership of and legal rights to the donated materials.

Explanation:

a formal and legal agreement between the donor and the repository that transfers ownership of and legal rights to the donated materials.

what is the answer to 7.4.4: Length of User's Name codehs

Answers

The program that ask the user to type there first name and then print out how many letters that is in there name is as follows:

x = input("what is your first name: ")

y = len(x)

print(f"There are {y} letters in your name")

Code explanation;

The code is written in python.

Firstly, we store the users name in the variable x.Then, we find the length of the users inputted name and store it in a variable y.Finally, we print the length of the users name using the print function.

learn more on python here: https://brainly.com/question/26738945

Why do Linux administrators prefer to give sudo access to application teams instead of letting them su to root?

Answers

Answer:

Explanation:

some distros like ubuntu do not even allow su to switch to root. furthermore the su to root is dangerous because the user becomes the all-powerful administrative account, so no warnings are issued if the application team user tries to do something system-breaking.

When purchasing a security program, you must make sure that _____. Select 2 options.

it can be implemented quickly

it can be easily adopted

it hinders operational efficiency

the employees are not involved

it is complex and complicated

Answers

Answer:

1 ans 3

Explanation:

Answer:

- it can be implemented quickly

- it can be easily adopted

Explanation:

When selecting a security program to purchase, you should want to ensure its efficiency. Correct on Edge.

I hope this helped!

Good luck <3

A timer is set after each frame is sent before waiting an ACK for that frame, how long does the timer take to be expired?

Answers

A timer needs to be set after each frame is sent before waiting an ACK for that frame. The length of time it takes for a  timer take to be expired depends on only when the first outstanding frames has expires first.

Some do take 5 min., 10 minutes, or even 48 hours while others depends on what the sender has set.

What is A timer is set after each frame about?

A sender is one that is not entitled  to hold a timer for each frame. It has to hold a single timer.

When a  the timer expires, the sender can then  resends all the frames whose ACK has not been seen or received yet. The sender often starts the timer at the time it is sending the first frame , and because of that, it is only when the timer for the first set frames expires before the sender can resend any other outstanding frames.

Learn more about timer from

https://brainly.com/question/25800303


Write a program that asks the user to type 5 integers
and writes the average of the 5 integers. This
program can use only 2 variables.

Answers


import Java.util*

public class Average{
public static void main(String [] args){

int sum = 0;
int numbers = 0;

for(int i = 0; i < 5; i++){
Scanner sc = new Scanner(System.in);
System.out.println(“Please enter your integers: “);
numbers = sc.nextInt();

sum += numbers;
}
System.out.println(“The average is: “ + sum/5)”
}
}

a. The insert, Delete, and Format options are present in the
group on the Home tab.

Answers

Answer:

False

Explanation:

They are on the keyboard.

Income taxes are an amount of money based on earnings and paid to the local, state, or Federal government
False
True

Answers

The answer is TRUE.
hope this helps x

Answer:

True

Explanation:

Hope you have a great day!

Other Questions
HELP DUE IN 5 MIN!!!!!!!!!!!!!!!!!!!!!! Draw a picture to answer.what is 1/4 of 12? Which element of the federal government best reflects the constitutional principle of the separation of powers? DirectionsD1. This is a working timeline, meaning that you will add to it throughout the course, and may include information fromprevious time periods. Include information on each of the nations that you have studied in the "The Road toRenaissance and Reformation unit. Research and gather information on events that took place during this timeperiod in order to place them correctly on the timeline. The following list is a guide to show you the some of themajor events you need in order to help you get started, you should have more information than what is below listedon your timeline. You will need each event below, and then you will add on any other major people and events thatoccurred during the time period (this is not in chronological order).a. Early Middle Agesb. High Middle Agesc. Late Middle Agesd. Muslim empire expandse. Great Schismf. Marco Polog. Great Famineh. Black Plague1. Hundred Years' WarJ. Renaissancek. Reformation1. Exploration2. For each person and event you need to include a date, short summary, and a picture that represents each marker onthe timeline3. Be creative and thorough but also have fun creating this timeline.4. Submit project to your teacher. Alex (31kg) and Cassie (19Kg) sit on a 10kg metre-long see-saw at the local park. The pivot of the see-saw is in the middle of its length. If Cassie sits at one end of the see-saw, where relative to the other end must Alex sit so the net torque is balanced? (unit:metres) What is the range of this data set? 64, 72, 74, 68, 70, 68, 68, 75, and 44 Discussion 5Kris Allen runs a pet daycare center. She needs to keep track of contact information for her customers, their animals, the services provided (such as walking and grooming), and the staff who are assigned to care for them. She also must send out invoices for payment each month. What features of spreadsheets and/or database software might she use to facilitate her business? Why do different elements produce distinct colors in the flame test Brainliest availableFind "X" Fill in the blanks please- 17. Find the volume of the prism. How do I get rid of these when watching a video Angelo has just been sentenced to a year-and-a-half incarceration. Those who oversee inmate placement are trying to decide whether to send Angelo to prison or allow him to finish his sentence in a local jail. Which of the following would be a benefit of being transferred to a prison?Prisons focus on rehabilitation of offenders.Prisons allow inmates to leave on work release.Prisons are best for those serving short sentences.Prisons allow inmates to have visits while jails dont. An 18 ft. tree casts a 15 ft. long shadow as shown in the following figure.Which of the following is the angle formed by the sun's rays and the ground?A.30B.40C.50D.60 sin^2(theta)(1+cot^2(theta))-1=0 For context, question 6 is:What inverse operation will be used to undo the volume of Julie's jewelry box to find its edge lengths?Volume formula for a cube is: volume = edge^3//I have already answered This, I need help with #7, which is:"If V = 216, what is the edge length of Julie's jewelry box?" 3. What is the hydrogen ion concentration of a solution with a pH of 2.0? Different between : Metalloids and alloys Petropoulos Resorts common stock sells for $58.49 per share and pays an annual dividend that increases by 1.3 percent annually. The market rate of return on this stock is 12.6 percent. What is the amount of the last dividend paid Your younger brother is getting stickers from a vending machine at the local supermarket. A proportion of stickers have thephrase "Girls Rule!" If there are eight stickers with this message in a sample of 36 stickers, what is the 95% confidence intervalfor this proportion? (1 point)0 (0.0864, 0.3580)0 (0.0862, 0.3578)0 (0.0847, 0.3553)0 (0.0812, 0.3256)