Consider the following code snippet. File hoursFile = new File("hoursWorked.txt"); Your program must read the contents of this file using a Scanner object. Which of the following is the correct syntax for doing this? Scanner in = new Scanner("hoursWorked.txt"); Scanner in = new Scanner(hoursFile); Scanner in = Scanner.open(hoursFile); Scanner in = Scanner("hoursWorked.txt");

Answers

Answer 1

Answer:

Scanner in = new Scanner(hoursFile);

Explanation:

The syntax to read the content of a file after the file has been created/initialized is as follows;

Scanner [variable-name] = new Scanner([object-name]);

From the question above, the [object-name] is hoursFile

Substitute [object-name] with hoursFile, the syntax becomes

Scanner [variable-name] = new Scanner(hoursFile);

[variable-name] can be anything as long as it follows variable naming convention;

From the list of given options, the option that answers the question is: Scanner in = new Scanner(hoursFile);


Related Questions

write some Drawbacks of the internet

Answers

Explanation:

Computer Virus can spread.

Data can be hacked.

It has made peoples lazy

It cannot work about electricity and mobile and computer like devices

..

Thank me if you like.. and follow me..

The internet is like a double-edged sword. It can be used as a study tool, and is full of an endless amount of information. Additionally, programs such as email allow the communication of ideas to be faster than ever before. The internet has increased globalization by a large amount. However, the internet can also be a huge distraction. Social media and games can make the younger generations more self conscious and wanting more instant gratification. Nonetheless, the internet is something that has forever changed both society as a whole and the way each person sees the world.

1. Who is the head of the family of the Lhops?​

Answers

This question is incomplete, here´s the complete question.  

Read 'Untrodden World of Lhops', by John Michael Chiramal

Who is the head of the family of the Lhops?​

Answer: the maternal uncle

Explanation:

The Lhops or Doyas are one of the smaller communities of Bhutan, isolated from the conventional rules of the Bhutanese society, they have the maternal uncle as the head of the family.  

Not only he has complete authority over the family´s everyday life, but he´s also in charge of the children´s upbringing and providing them with an inheritance of his property.

GuardIN is an IT security firm. It deals with highly secure data for a wide variety of software and e-commerce agreements, trademark licenses, and patent licenses. GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself. The cloud also needs to be designed in such a way that all users of the organization can access it without any lag. Which of the following cloud computing options would be most suitable for GuardIN?
A) A public cloud
B) A community cloud
C) A hybrid cloud
D) A private cloud

Answers

Answer:

D) A private cloud

Explanation:

Note we are told that GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself.

Thus, to be able to manage the cloud infrastructure itself; it implies buying it's own hardware equipments, which means it is best to use a private cloud computing option.

Doing so would give GuardIN the opportunity to design the cloud storage in a way that all users of the organization can access it without any lag.

Using a material on the internet for your assignment without acknowledging the source is known as A. Plagiarism B. Piracy C. Ethical D. Copyright

Answers

Answer:

A. Plagiarism

Explanation:

Plagiarism is simply the act of representing an author's thoughts , ideas , expression , writings as one's own.

Tom walks into the accounting department and walks into a mess! User A can't access the Internet, User B has forgotten her password, User C's system is overheating to the point of smoking and the administrator is worried there might be a virus on all the systems. Whose system should he address first

Answers

Answer:

User C.

Explanation:

As per the given details, the problem of user C's system must be addressed first due to the seriousness of his case. His computer is excessively overheating up to the smoking point and if his problem is not addressed soon, it will damage the vital parts of the computer or may also explode. The other users having the problem of inability to access the internet or issue of forgotten password can be addressed later as these are minor problems that do not have as such consequences. Thus, user C is the correct answer.

Assuming that a user enters 68 as the score, what is the output of the following code snippet? int score = 68; if (score < 50) { System.out.println("F"); } else if (score >= 50 || score < 55) { System.out.println("D"); } else if (score >= 55 || score < 65) { System.out.println("C"); } else if (score >= 65 || score < 75) { System.out.println("B"); } else if (score >= 75 || score < 80) { System.out.println("B+"); } else { System.out.println("A"); } D C B A

Answers

Answer:

D

Explanation:

Using if in this way will validate one by one, and finding a true value will not validate the rest of "else if"

score = 68

if (score < 50) --> print "F"

68 < 50 --> false

else if (score >= 50 OR score < 55)  --> print "D"

68 > = 50  TRUE .... (The OR operator displays a record if any of the conditions separated by OR is TRUE)

As this condition is true the system will not validate the other conditions

A user receives an email containing a co-workers birth date and social security number. The email was not requested and it had not been encrypted when sent. What policy does the information in the email violate

Answers

Answer:

PII

Explanation:

The information in the email violates the PII. That is Personally identifiable information. PII, are nothing but any data that could potentially be used to identify a person. Examples of which can be  a full name, Social Security number, driver's license number, bank account number, passport number, and email address, etc.

What is a path and how do you know that it is filled and selected

Answers

Explanation:

A path represents a selected editing area of an image, this feature is typically available when using Adobe Photoshop software.

For example, a photographer may select the entire face area of his subject as his path (work path). To know when it is filled the photographer observes to see when the colour changes or other changes are applied to the background layer of the selected path.

Justify the statement "The same job title can have different job roles and different qualification criteria in different organizations." Compare job titles and their respective roles and qualifications from at least two organizations in different industries, and write a short essay explaining your reasoning.

Answers

Answer:

Below is an executive summary of this particular issue.

Explanation:

Each organization has differential requirements and preferences. This same employment opportunities rely heavily on either the structure of the company and indeed the amount of equipment that it possesses. Hence, whenever they recruit an individual on a specific job, their work description can differ based on the organization's needs including growth.

Answer:

In the classified section of a local newspaper, I came across job openings for the post of a network engineer in two different companies. One was from the airline industry, while the other was from the food and beverage industry.

The airline company required an applicant to have a bachelor's degree in network administration. The job posting specified that applicants with supporting CCENT or CompTIA Security+ certifications would be preferred. The company was willing to consider candidates with no prior experience. The job responsibilities included: maintaining security, DNS, IP routing, firewalls, and troubleshooting IT-related problems. The role also required skills to manage multi-site network operations, operating systems, and other software applications in public as well as private facilities. Another responsibility was to complete the time logs in the company's records to facilitate timely and accurate billing.

For the role of a network engineer in the food and beverage industry, the required qualification was any bachelor's degree in computer science with a minimum of one year of relevant experience. Certifications were an added advantage, but they were not a necessity. The job role required skills to troubleshoot network glitches, monitor network usage, install software and hardware infrastructure, provide technical assistance to users, and suggest improvements in the system.

Explanation:

Instead of using the automatic toString() method with your classes, it is usually more useful to write your own ____ version of the toString()method that displays some or all of the data field values for the object with which you use it.
a. overloaded
b. static
c. protected
d. condensed

Answers

Answer:

The answer is "Option a"

Explanation:

The overloading is the most essential aspect in the java programming This function can achieve different features with the same method term. To obtain the required information fields or entity type, the toString() function is overloaded, and the wrong choice can be defined as follows:

In option b, It is wrong because it is a keyword.In option c, It is wrong because it is an access modifier.In option d, It is wrong because it is a type of programming.

what should i do after learning python? how can I make apps or gaming apps? IF YOUR ANSWER WILL BE GOOD I WILL MARK AS BRAINLIEST

Answers

Answer:

Here are some of the things that you can do after learning Python:

Learn a Web Development Framework

Learn Machine Learning

Start Teaching Python to Beginners (and earn some bucks)

These are the top three ways to proceed

Explanation:

Learn a web development framework

"PindCart, an online retailer, places a small file on the computer hard drive of its visitors to recognize them when they revisit their Web site. The company uses this file to generate a personalized welcome message to its visitors. This small file is called a ______."

Answers

Answer:  cookie

Explanation:

A cookie is a small welcome file contains the information in the form og letters and numbers.It is downloaded on to a computer when a website is visited.

Hence, if a company uses a small file on the computer hard drive of its visitors to recognize them when they revisit their Web site to generate a personalized welcome message to its visitors. This small file is called a cookie.

Escribe todas las posibles combinaciones que pueden haber entre 4 bits.

Answers

Answer:

The answer is "[tex]\bold{2^n\ \ _{where} \ \ \ n \ is\ bit }[/tex]"

Explanation:

The Combinations could be produced by using n-bits [tex]2^n[/tex] . It s enables you to generate the 4-bit numbers that are:

[tex]\to 2^4 = 16[/tex] combinations.

for the 4-bit, the combination of 2 = 16, which are its possible combination and for the   10 variations  appropriate 16 combinations are used,  As we know for 4 bit 16 Combinations can be generated which are from 0 to 15.

A binary search function is searching for a value that is stored in the middle element of an array. How many times will the function read an element in the array before finding the value?

Answers

Answer: 1 time.

Explanation:

A binary function is also known as a half-interval search is a search algorithm to find the position of a given element x within a well-sorted array []. Binary search compares the target value to the middle element of the array.It ignores half of the elements just after one comparison. it compares x with the middle element.

So, the function read an element one time in the array before finding the value.

Administrator access initiative brings together people from industry, disability organizations, government, and research labs from around the world to develop guidelines and resources to help make the Web accessible to people with disabilities including auditory, cognitive, neurological, physical, speech, and visual disabilities.
a) true
b) false

Answers

Answer:

False.

Explanation:

Web Accessibility Initiative (WAI) brings together people from industry, disability organizations, government, and research labs from around the world to develop guidelines and resources to help make the Web accessible to people with disabilities including auditory, cognitive, neurological, physical, speech, and visual disabilities.

It is one of the features of the World Wide Web Consortium (W3C) develiped in 1997 and is aimed at developing standards and support materials to assist in understanding and implementing accessibility for users with disabilities.

The variable dp is to refer to an array of double. Assuming the integer variable n has been assigned a value, declare dp appropriately, allocate an array of n doubles and assign the resulting pointer to dp.

Answers

Answer:

double × dp = NULL ;

int n;

n = <some value> ;

dp = new double[n]

Explanation:

According to the given question, the relevant data provided is as follows

Variable dp = Array of double

Based on the above information,

The allocation of an array for doubling n and assigned it to dp is here below:

double × dp = NULL ;

int n;

n = <some value> ;

dp = new double[n]

Hence, the above is the answer

Which of the following statements are true? Select one or more: a. A socket is a kind of opening. b. A socket represents one endpoint of a network connection. c. A program uses a socket to communicate with another program over the network. d. Data written by a program to the socket at one end of the connection is transmitted to the socket on the other end of the connection, where it can be read by the program at that end.

Answers

Answer:

a. A socket is a kind of opening.

b. A socket represents one endpoint of a network connection.

c. A program uses a socket to communicate with another program over the network.

d. Data written by a program to the socket at one end of the connection is transmitted to the socket on the other end of the connection, where it can be read by the program at that end.

Explanation:

A socket is an endpoint in the network node of a computer network that serves the role of sending and receiving data written by a program across the network. The application programming interface specifies the attributes of a socket, through the socket descriptor. The socket address serves the purpose of making the socket identifiable by other hosts.

The socket address consists of the transport protocol, IP address, and port number. Just like a port serves as the endpoint in hardware, so does the socket also function as an endpoint in a network connection.

can a 0.90 GB storage left android phone download an app of 28 MB plsssss fast I will give you brainliest why and why not?

Answers

Answer:

Yes

Explanation:

0.9 GB = 900 MB. That is a plenty of space for a 28 MB app.

Ryan is creating a website for an automobile company. He wants to include media files on the web page and make the page appealing to the viewers.
​Ryan wants a particular embedded media clip to automatically restart when it has finished playing. Which of the following HTML audio and video element attributes must Ryan include in his code to accomplish this?
A. ​src
B. ​loop
C. ​controls
D. ​preload

Answers

Answer:

I think it's preload :P

Explanation:

But just be sure with some sources ok ! :♡

Other than hard discs and flash discs, identify other three different storage media

Answers

Answer:

A storage media is any media that can store data.

1. USB flash memory

2. Memory stick

3. Floppy disk

A technician has a client’s laptop that is randomly shutting down. Which of the following is the FIRST step of the troubleshooting theory that the technician will perform to resolve the laptop’s issue?
A. Document finding, actions, and outcomes
B. Identify the problem
C. Establish a theory
D. Establish a plan of action to resolve the problem

Answers

Answer:

B

.Identify the problem

Computer security is concerned with protecting information, hardware, and software from unauthorized use, as well as preventing or limiting the damage from intrusions, sabotage, and natural disasters.
a) true
b) false

Answers

The correct answer is True

Explanation:

Computer security is a branch of security that focuses on the security of computer systems. This includes preventing cyber attacks that could steal the information or damage the software (programming code), as well as, preventing physical attacks or damage, this includes stopping unauthorized personnel from accessing the computers or devices and limiting the damages that might occur in situations such as fires, floods, etc. Additionally, computer security is now an important factor in most companies and organizations as relevant information is saved in computers, also, many functions rely on the use of computer systems.

According to this, the statement about computer security is true because this comprises the protection of hardware, software, and information in cases such as natural disasters, intrusions, etc.

if a person walks 10 metres due to south in 10 seconds 10 due east in the next 10 seconds and transmitted you're not in the next 10 seconds then he has Dash velocity​

Answers

Answer:

[tex]\frac{1}{3}\ m/s[/tex]

Explanation:

The computation of the velocity by using the following formula is

As we know that

[tex]Velocity = \frac{Displacement}{Total\ time\ taken}[/tex]

where,

Displacement is 10 meters

Total time taken is 30 seconds

Now placing these values to the above formula

So, the velocity of Dash is

[tex]= \frac{10\ meters}{30\ seconds}[/tex]

[tex]= \frac{1}{3}\ m/s[/tex]

We simply applied the above formula so that we can get the velocity and the same is to be considered

MULTIPLE CHOICE When you log in to a browser, such as Google Chrome, you are accessing a profile that you can save and use on many different devices. What are some of the personal preferences you can save to your user profile for a browser? Select all that apply.

Answers

Answer:

The personal preferences that can be saved are

A. Customize your bookmark bar

C Change your home page

D Enable safe browsing in your privacy setting

Explanation:

The Bookmark manager can be used for personal customization of the bookmarks in chrome

The Bookmark manager is located within the customization button located at the top right hand corner of the browser under bookmarks

The personally preferred homepage can be selected under appearance category in the settings menu

The enable safe browsing preferences can be found under privacy and security sub menu within the settings menu window.

Which of the following statements is true? A. Ethernet connections allow the most mobility for users. B. Maximum advertised connection speeds are for Wi-Fi connections only. C. Every computer user can expect the same Internet connection speed. D. The actual speed of a network can differ from the maximum advertised speeds. E. Wi-Fi is the best option for intensive Internet users who have high data

Answers

Answer:

A

Explanation:

Ethernet connections allow the most mobility for users

Employees often have more than one laptop-so one or both of them are always handheld. For this cause, companies turn to the versatility and scalability of wireless networks. It is convenient to grant workers connectivity through a wireless network, which they can use to connect several devices. Tablets, smartphones and laptops can all be connected to the network, which enables employees to access

Answer: D. The actual speed of a network can differ from the maximum advertised speeds



Explanation:

just got it correct on the test

One technique to find the "things" that need to be included in the new system begins by starting with a user and the use cases and then try to identify the necessary informational "things." This technique is called the _______.​ a. ​ check list technique b. ​ domain analysis technique c. ​ noun technique d. ​ brainstorming technique

Answers

Answer:

Coding is a skill where you take instructions (the steps in a task) and translate it into a languaage.

Explanation:

Coding is a skill where you take instructions (the steps in a task) and translate it into a language the computer understands since computers do not communicate like humans. They communicate in a language called BINARY and

Chapter 21 discusses four aspects of the speaking situation you should take into account when planning the graphics you'll use in an oral presentation including the length of the presentation, the size and layout of the room, and the available equipment. What is the last aspect?

Answers

Answer:

The answer is "audience aptitude and experience "

Explanation:

The presentation is the ability to provide a variety of audiences with successful and stimulating interactions. The main objective of an oral presentation is to talk formally to a live audience about a particular subject. You have to write an oral speech that engages the audience and fulfills your goals.

In this type of presentation, the Listener-centric concept is effective as the productivity of a speaker is enhanced by creating and presenting the speech throughout the proper manner.

A user calls the helpdesk and states that they are receiving an IP conflict error on their computer. The user is on a company network that uses DHCP. The technician verifies the PC is using DHCP to obtain TCP/IP settings. Which of the following commands should the helpdesk technician use to resolve this issue? (Select two.)
A. IPCONFIG /REGISTERDNS
B. IPCONFIG /FLUSHDNS
C. IPCONFIG /RELEASE
D. IPCONFIG /RENEW
E. IPCONFIG /ALL

Answers

Answer:

a

Explanation:

none

Kris is the project manager for a large software company. Which part of project management describes the overall project in detail? Analysis report Resources document Scope Scope creep

Answers

Answer:

The given option "Resource document" is the correct answer.

Explanation:

Whenever it applies to chronology as either the documentation a resource records collection of specific documents should indeed be regarded as a component of this kind of record. The resource component encompasses a series of proclamations provided by the researcher including its memorandum, and therefore is willing to take responsibility for each other by the very same body is nonetheless accountable again for the file.

The remaining three options do not apply to something like the specified scenario. And the latter is the correct one.

Answer:

Resource document

Explanation:

Assume the existence of a BankAccount class with a method, getAvailable that returns the amount of available funds in the account (as an integer), and a subclass, OverdraftedAccount, with two integer instance variables:

Answers

Answer: This is hard but I will research ok

Explanation:

Other Questions
Which of the following is a characteristic of the Enlightenment?A. People began to rely on reason rather than religion to explain natural phenomena.B. People began to use advanced machinery to replace human labor at many jobs.C. People began to question the authority of monarchs and emphasized individualismD. People began to exchange goods and ideas among vastly different cultures. Read this passage about the partition of Korea. "The partition of Korea into two zones dominates the political and economic life of the peninsular. The division of Korea at the 38th parallel has turned into a hard and fast boundary which cuts off all intercourse between the northern and southern halves of the country, except for the exchange of mail and the transfer of surplus electric power from North to South Korea." -The Situation in Korea, 1947 Report The passage says that the partition of Korea _______________. . Which of the following correctly defines mass? A. Mass is the quantity of a three dimensional space occupied by a liquid B. Mass is the width of an object C. Mass is the measurement of how much matter is in an object D. Mass is the quantity of a three dimensional space occupied by a solid Pinnacle Financial Services managers meet annually to create a list of potential future complications and plan how to respond to each possibility. Pinnacle is practicing _______ planning. single-use ad-hoc divisional-level contingency functional-level Shelby baked 48 cookies with 6 scoops of flower. how many scoops of flour does Shelby need in order to bake 64 cookies? Solve using unit rates. what does the variable k represent in the following equation : k/2 +1/2=3 what fractons time another equal a whole number Please help, much needed. A lot of points Which expression is equivalent to 4 square root 6 divided by 3 root 2? Matilda has been on top of the world for the past week. She feels invincible and that she can do no wrong. She is working on solving the world's major problems and is sure she can come up with an answer. She has had very little sleep over the last few days. Matilda is likely suffering from Tosh. Inc.'s bonds currently sell for $980 and have a par value of $1,000. They pay a $95 annual coupon and have a 12-year maturity, but they can be called in 3 years at $1,150. What is their yield to call (YTC)? Suppose a 22.092 g sample of a 1:1 mixture of acetylferrocene and ferrocene was separated by column chromatography, and the recovered fractions weighed 9.017 g (acetylferrocene) and 8.075 g (ferrocene), what was the percent recovery of acetylferrocene? 8. What type of chemical bond forms between positive and negative ions?metallicjoniccovalent The angle measurements in the diagram are represented by the following expressions. 10 example of proper noun Select all the correct answers. What are two aspects of setting? HELP PLEASE!! I don't get it!!!!!! In The Autobiography of an Ex-Colored Man, what gift does the narrator's father send him?A trumpet.A piano.A book.A vest. A rockfall is best described as: this is in the paragraph. Before he became the king of the gods, Zeus overthrew his father Cronus. How can sentence 3 be changed from active voice to passive voice? A. Zeus overthrew Cronus, who was his father, before he became the king of the gods. B. Zeus, before he became the king of the gods, overthrew his father Cronus. C. Cronus was overthrown by his son Zeus, who would become the king of the gods. D. Before Zeus became the king of the gods, he overthrew his father Cronus.