Define a public static method named s2f that takes two String arguments, the name of a file and some text. The method creates the file and writes the text to it. If all goes well the method returns true. If, however, either of its arguments are null or if there is any problem in creating or writin

Answers

Answer 1

Answer:

Java solution (because only major programming language that has public static methods)

(import java.io.* before hand)

public static boolean s2f(String fileName, String text){

   try{

       PrintWriter out = new PrintWriter(new File(fileName));

       out.println(text);

       out.close();

       return true;

   }

   catch(Exception e){

       return false;

   }

}


Related Questions


An employee who is devoted to doing his very best to uphold the company image is:

Answers

Answer:

Loyal

Explanation:

A loyal employee work in accordance with the ethics and core values of the company they are associated. The honor and respect all company decisions once the decisions have been made and they are the advocates of the company decisions and policies.

Loyal employees are collaborative with coworkers, vendors, partners, suppliers and customers in pushing for the success of companies projects, and goal achievement.

Loyal employees are dedicated to attending to detail and conform to ethical standards.

Q8:What is the correct way to declare an integer named age? ----- , ---- , ----- , ----- . hint= use this (variable , integer ) .

Answers

Answer:

age=int(14)

Explanation:

When declaring an integer variable you use int which stands for integer. You place the number (age) inside the parentheses of int.

What are the 4 main components to developing a portfolio

Answers

Answer:

Step 1: Determining Asset Allocation

Step 2: Achieving the Portfolio

Step 3: Reassessing Weightings

Step 4: Rebalancing Strategically

The Bottom Line

Explanation:

Anyone have Y.O.U.T.U.B.E or S.O.U.N.D.C.L.O.U.D. I need help putting my music and videos out there

Answers

Answer:

I do have Y.O.U.T.U.B.E.

Explanation:

1. Go on Y.O.U.T.U.B.E app.

2. Create account or log in to an existing account.

3. In the welcome screen, click the button of a camera on the top right corner next to your photo icon.

4. Click "Upload Video"

5. Then upload your video.

6. Add a description and details

7. Done! Just upload to on Y.O.U.T.U.B.E.

I hope this helps! Thank you:)

An administrator wants to give a user limited access rights in Windows Vista so that the user can install printers and create local user accounts. Which of the following accounts should the administrator create for the user?

a. Power user
b. Administrator
c. Standard
d. Guest

Answers

Answer:

a. Power user

Explanation:

In this situation, the administrator should create a power user account for the user. This is a user who uses advanced features of computer hardware, operating systems, programs, or websites that are not used by the average user as well as having similar permissions to an administrator without the ability to edit or view subscriptions or other users and they do not have access to billing information. Thus in this scenario, a power user account will allow the individual to complete all of their required tasks but at the same time preventing them from accessing administrator level rights.

Where can you go in QuickBooks Online to import a list of products and services? Select the Quick Create icon and under the Tools column, select Import Data, then Products and Services Select the Gear icon and under the Tools column, select Import Data, then Products and services Select the Accountant toolbox and under the Tools column, select Import Data, then Products and services

Answers

Answer:

Select the Gear icon and under the Tools column, select Import Data, then Products and services

Explanation:

The steps to import list of products and services in QuickBooks Online

Select Settings Gear icon

Under Tools column, select Import Data.

Select Products and Services.

Import products and services page will appear.

Select Browse.  

Map your information of your file to corresponding fields in Quick Books .

Select Import.

61. Select an activity of the Production Phase: a. a web authoring tool is often used b. the graphics, web pages, and other components are created c. the web pages are individually tested d. all of the above

Answers

Answer:

d. all of the above.

Explanation:

Since the advent of digital technology, production of goods and services have experienced a significant change from the traditional methods of production. This paradigm shift is made possible by the application of various modern technology.

Production processes are generally being facilitated and enhanced by the use of;

1. Computer-integrated manufacturing (CIM).

2. Computer-aided process planning (CAPP).

3. Computer-aided design (CAD).

4. Computer numerical control (CNC).

In the process of selecting an activity of the production phase:

1. A web authoring tool is often used.

2. The graphics, web pages, and other components are created.

3. The web pages are individually tested.

Words like "free" or "percent off" will not only trigger spam filters for your email, but will also ___________

Answers

Answer:

eliminasnados

Explanation:

Universal Containers (UC) has multi-level account hierarchies that represent departments within their major Accounts. Users are creating duplicate Contacts across multiple departments. UC wants to clean the data so as to have a single Contact across departments. What two solutions should UC implement to cleanse their data? (Choose 2 answers) Use Data to standardize Contact address information to help identify duplicates Make use of the Merge Contacts feature of Salesforce to merge duplicates for an Account Use Workflow rules to standardize Contact information to identify and prevent duplicates Make use of a third-party tool to help merge duplicate Contacts across Accounts

Answers

Answer:

The answer is "first and the last choice".

Explanation:

For providing single contact across all department the Universal Containers (UC) uses two methods, that can be defined as follows:

It uses the standardized contact in data, that helps to identify multiple copies, of the Information and convert it into standardized contact information.  It uses the third-party tool, which helps to merge the duplicate contact information through accounts.

write a watch java program​

Answers

Answer:

import javax.swing.*;  

import java.awt.*;  

import java.text.*;  

import java.util.*;  

public class DigitalWatch implements Runnable{  

JFrame f;  

Thread t=null;  

int hours=0, minutes=0, seconds=0;  

String timeString = "";  

JButton b;  

 

DigitalWatch(){  

   f=new JFrame();  

     

   t = new Thread(this);  

       t.start();  

     

   b=new JButton();  

       b.setBounds(100,100,100,50);  

     

   f.add(b);  

   f.setSize(300,400);  

   f.setLayout(null);  

   f.setVisible(true);  

}  

 

public void run() {  

     try {  

        while (true) {  

 

           Calendar cal = Calendar.getInstance();  

           hours = cal.get( Calendar.HOUR_OF_DAY );  

           if ( hours > 12 ) hours -= 12;  

           minutes = cal.get( Calendar.MINUTE );  

           seconds = cal.get( Calendar.SECOND );  

 

           SimpleDateFormat formatter = new SimpleDateFormat("hh:mm:ss");  

           Date date = cal.getTime();  

           timeString = formatter.format( date );  

 

           printTime();  

 

           t.sleep( 1000 );  // interval given in milliseconds  

        }  

     }  

     catch (Exception e) { }  

}  

 

public void printTime(){  

b.setText(timeString);  

}  

 

public static void main(String[] args) {  

   new DigitalWatch();  

         

 

}  

}  

Explanation:

MS Excel is a powerful spreadsheet program that helps people with complex mathematical calculations. In what ways could you use Excel for personal, work and school purposes? Give an example for all three.

Answers

Answer:

Different uses of MS Excel in personal, work and school purposes are discussed below in details.

Explanation:

For personal: MS Excel is that the data can be obtained online from any portion of the world anytime and anyplace. It presents the ease of reaching the excel files over cell phones even if there is the availability of laptops.

For Work: MS Excel is being extensively used in the preparation of a large work project or celebration or marriage party, where it can keep track of different duties, applications, and deadlines, and to examine the plans of collaborators in the planning of the event.

For School purpose: students can improve their training skills to resolve basic and logical analytical & mathematical puzzles in excel.

What is a common open source operating system

MacOS

Linux

IOS

Windows 10

Answers

Linux. But some distros aren't open source... Example: Ubuntu OS

Linux a common open-source operating system is the most prominent example. The correct option is an option (B).

Linux is an open-source Unix-like operating system kernel that serves as the foundation for various Linux distributions (commonly referred to as "distros"). Some popular Linux distributions include Ubuntu, Fedora, Debian, and CentOS, among others. These distributions are built on top of the Linux kernel and provide a complete operating system with additional software and tools.

Windows 10, developed by Microsoft, is also not an open source operating system. It is a proprietary operating system that is widely used on personal computers.

So, Linux is the most prominent example. The correct option is an option (B).

To know more about Linux:

https://brainly.com/question/32161731

#SPJ4

do you guys know the addition and subtraction of binary numbersi need help in that

Answers

Answer:

The process of adding binary numbers is the same as the process adding decimal numbers which are the normal base 10 numbers with the difference being that in decimal numbers there are digits 1 to 9 and in binary numbers, there are only digits 1 and 0

So when we add binary numbers, we havr;

0 + 0 = 0

1 + 0 = 1

0 + 1 = 1

1 + 1 = 10

Why 1 + 1 = 10 is because, there are no 2s in binary number system, just like when we get from 0 to 9 in a decimal system we start again at 10

For binary subtraction, we have the following;

0 - 0 = 0

1 - 0 = 1

1  - 1 = 0

10 - 1 = 1 (from 1 + 1 = 10)

For example 1100₂ - 1010₂ = 0010₂

As shown below

Borrow 1

,     ↓

 1, 1 ¹0 0

 1, 0 1 0

, 0  0  1  0

The addition and subtraction of the binary number system are similar to that of the decimal number system. The only difference is that the decimal number system consists the digit from 0-9 and their base is 10 whereas the binary number system consists only two digits (0 and 1) which make their operation easier

Explanation:

A(n) ________ virus runs a program that searches for common types of data files, compresses them, and makes them unusable.

Answers

Answer:

encryption

Explanation:

A(n) encryption   virus runs a program that searches for common types of data files, compresses them, and makes them unusable.

Which section, or hive, in the Windows Registry stores information about drag-and-drop rules, program shortcuts, the user interface, and related items?

Answers

Answer:

The correct answer will be "HKEY_CLASSES_ROOT (HKCR) ".

Explanation:

The Windows Registry seems to be an environment inside the operating system applications of Microsoft Windows that holds certain details as to whether machine memory becomes configured up, which applications are to be launched whenever the operating process becomes booted, which hardware is connected and the device solutions were selected.This HKCR is indeed a Windows Registry registration system hive but instead incorporates organization file extension additional data, and also some data from a conceptual identification number, class ID, but mostly connectivity ID. It  includes references again for correct file identifier as well as COM class contact information including such IIDs.

Which type of systems development is characterized by significantly speeding up the design phase and the generation of information requirements and involving users at an intense​ level? .

Answers

Answer:

Joint Application Development (JAD)

Explanation:

Joint Application Development is a method of application development that  lay emphasis on the up-front aspect of the application development cycle whereby steady communication between the designers and the intended users of the application under development by coming together in collaborative workshop styled discussions known as JAD sessions involving the mediators, facilitator, observers, end users, experts, and developers. As such with JAD process application development result in fewer errors high quality and is completed in lesser time.

Calories, sugars, and total fats could exceed the declared calorie value on the menu by only what percentage?

Answers

Answer:

20

Explanation:

What music is best for calming down and relaxing?

Answers

could be lofi hip hop or chill type music beats like that or soft jazz

Suppose you work at a startup with limited funding. Why might you prefer Azure data storage over an on-premises solution?
a. To ensure you run on a specific brand of hardware, which will let you form a marketing partnership with that hardware vendor
b. The Azure pay-as-you-go-billing models lets you avoid buying expensive hardware
c. To get exct control over the location of your data store

Answers

Answer:

The correct option is;

b. The Azure pay-as-you-go-billing models lets you avoid buying expensive hardware

Explanation:

The Azure pay-as-you-go billing model allows the flexibility in financing such that the organization is able to meet its financial needs and maintain goal oriented budget. The business is also able to experience immediate cost saving from lower initial deployment costs to minimal cost requirement associated with maintaining scaled and complex organizational supporting systems.

If you wanted to find out whether an integer contained an even number of 1 bits, which status flag would be useful

Answers

Answer:

The correct answer will be "Parity".

Explanation:

Parity seems to be a methodology that tests when information is transferred or missing or overwritten when something is transferred between one storage location to another, and then it is communicated between processors or devices.It would be used whilst also contrasting the container as well as the aggregated parity to evaluate or dual inspect for inaccuracies.

difference between . RAM and hard disk​

Answers

Answer:

                  RAM                                                  HARD DISK    

RAM is used to store computer           | HDD, hard disk has permanent

programs and data that CPU needs     | storage and it is used to

in real time. RAM data is volatile          | store user specific data

and is erased once computer is          | and operating system files.

switched off.                                          |  

 

RAM - This means RANDOM ACCESS MEMORY and it’s used to store data which can’t last for a long period of time
For example when you calculate a value in a calculator the result is stored in the RAM and can be accessed in the history for a little period of time
HARD DISK - This is like the internal memory of the desktop it’s has higher capacity and can be used to store files and can be accessed after a long period of time. Hope this is okay

Due to the fact that the * character can be used to match all ​characters in a filename, or all files in a directory, it is referred to as a ____________ metacharacter

Answers

Answer:

"Wildcard " seems to be the correct choice.

Explanation:

A metacharacter would be any character with a particular relevance, including a carat (^), a dollar sign ($) as well as an asterisk (*).It is different compared to something like the wildcard metacharacter. This same character developers have been using alone would be a period or perhaps a dot. With the exception of a new line it compares another other character.

What do digital signals tum sounds into?
A. analog signals
B. interference
C. continuity
D. zeros and ones​

Answers

Digital signals turn sounds into analog signals

Write a Java program that generates the second, third, and fourth powers of a list of whole numbers from 1 to n where n is input by the user. Write a Java program to do this. • First, ask the user for the largest of the whole numbers to use (n). • Second, output column headers (see below, n, n^2, n^3, n^4). • Then, use a for loop to iterate from 1 to n, computing each of that loop variable to the second power, third power and fourth power, respectively. NB: The values should be stored in a 2dimensional array. Display the values as shown below: Sample output

Answers

Answer:

//import the Scanner class

import java.util.Scanner;

//Begin class definition

public class Powers{

       //Begin the main method

    public static void main(String []args){

       

        //Create an object of the Scanner class

        //to allow for user inputs

       Scanner input = new Scanner(System.in);

       

        //Prompt the user to enter the largest of the whole number

       System.out.println("Enter the largest of the whole numbers to use");

       

        //Receive user input using the Scanner object

        //and store in an integer variable

       int n = input.nextInt();

       //Create a two-dimensional array using the user input

       int [][] powerlist = new int [n][4];

       

       //Create an outer for loop

       //to loop as many times as the number entered by the user

       for (int i = 0; i < n; i++){

           //Create an inner loop to find

           //the powers of each of the numbers

           for(int j = 0; j < 4; j++){

               //Typecast the value returned from the Math.pow() function

               powerlist[i][j] = (int) Math.pow((i+1), (j+1));

               

           }

           

       }

       

       //Print out the header of the table

       //\t will print a tab character.

      System.out.println("n" + "\t\t" + "n^2" + "\t\t" + "n^3" + "\t\t" + "n^4");

       

       //Print out the elements in the two dimensional array

      for (int i = 0; i < powerlist.length; i++){

         

          for(int j = 0; j < powerlist[i].length; j++){

               //Separate each term by two tabs

              System.out.print(powerlist[i][j] + "\t\t");

           }

           

           System.out.println();

           

       }

       

    }

}

Sample Output:

Enter the largest of the whole numbers to use

4

n  n^2  n^3  n^4

1  1  1  1  

2  4  8  16  

3  9  27  81  

4  16  64  256

Explanation:

The code above has been written in Java and it contains comments explaining important lines in the code. Please go through the comments.

For clarity, the actual lines of code have been written in bold face to distinguish them from comments.

Screenshots of the code and a sample output have also been attached to this response.

The program is an illustration of loops.

Loops are used to perform repetitive and iterative operations.

The program in Java where comments are used to explain each line s as follows:

import java.util.*;

public class Main{

public static void main(String []args){

   //This creates a scanner object

   Scanner input = new Scanner(System.in);

   //This prompts the user for the largest integer

   System.out.print("Largest:");

   //This gets input for the prompt

   int n = input.nextInt();

   //This prints the output header

      System.out.println("n" + "\t" + "n^2" + "\t" + "n^3" + "\t" + "n^4");

      //This iterates from 1 to n

      for (int i = 1; i <= n; i++){

          //This iterates through the powers

          for(int j = 0; j < 4; j++){

              //This displays each output

              System.out.print((int) Math.pow((i), (j+1))+"\t");

          }

          //This prints a new line

          System.out.println();

      }

   }

}

Read more about similar programs at:

https://brainly.com/question/5419214

A whole-house surge protector is installed ________. at the breaker panel on computers on each device and appliance at the power line from the street

Answers

Answer:

the breaker panel

Explanation:

A whole-house surge protector is installed at the breaker panel. This panel is the main distribution point for all of the electrical circuits in your home. This panel divides your home's electrical system into different sectors, each with its own surge protector. The electricity flows through an electrical meter, which records your electricity usage, and then into the panel, thus providing electricity to the entire household.

Jonah needs to add a list of the websites he used to his report. He opens the "Websites" document and copies the information. He now needs to change his view to the "Renaissance" report to add the information before saving his report. What are the steps, in order, that Jonah needs to follow to view the "Renaissance" report?

Answers

Answer:

1.Go to the ribbon area

2.Click on the View tab.

3.Click on the Switch Windows tab.

4.Click on the "Renaissance" report

Explanation:

Answer:

1.Go to the ribbon area

2.Click on the View tab.

3.Click on the Switch Windows tab.

4.Click on the "Renaissance" report

Explanation:

just took it

In a response of approximately 50 words, explain why it would be essential for the successful A/V technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.

Answers

Answer:

The role of an audiovisual technician are to service, operate, maintain and repair and set electronic equipment meant for meetings, concerts, webinars, teleconferences, presentation, television and radio broadcasting. Audio technicians playback video recordings, they improve set lighting  they ensure proper graphics coordination and they mix audio sound boards making after-school activities essential to the audiovisual career development.

Explanation:

To protect the data, either the signature alone or the signature plus the message are mapped into printable ASCII characters using a scheme known as ________ or base64mapping.

Answers

Answer:

Base64 encoding

Explanation:

Base64 encoding is a binary to text encoding scheme. Binary data is represented in a printable ASCII string format by translation into radix-64 representation.

Base64 mapping works with a 64-character subset of US ASCII charset. The 64 characters are mapped to an equivalent 64-bit binary sequence. An extra 65th character is used for padding.

An alphabet is assigned to each of the 6-bit binary sequences from 0 to 63. The 6-bit binary to alphabet mapping is used in the encoding process.

Analyzing computer systems to gather potential legal evidence is computer ________. enforcement forensics detective work analysis

Answers

Answer:

  forensics

Explanation:

Analyzing computer systems to gather potential legal evidence is computer forensics.

Why was language important during the ancient times in regards to visual representation

Answers

Answer:

Explanation:

It was important back then because if their was an enemy attacking they could use their language instead of maybe shouting or throwing stuff and its easier to use language because you don't have to cause a ruckus.

Other Questions
the distance between the points (5, 1) and (2, 1). factoring trinomials: 8)-2x2 + 8x + 10 * "George has completely lost his sight during the past year but medical experts can find no physical reason for his blindness. This could be an example of" choose the best answer. The 6.0 M HCl solution must be added to the crucible in the fume hood becausea) the wet hydrogen gas released can cause explosion.b) the HCl used is very concentrated.c) it is aafer to do the experiment in the fume hood rather on the bench.d) the HCl can react quickly with the zinc solid in the fume hood. What book written in the early 1850s informed many about the tribulations of southern slaves and led to greater regional divide within the United States A jar contains 12 caramels, 7 mints and 16 dark chocolates. The probability of selecting a dark chocolate, eating it, and then a selecting a caramel is the setup. What is the probability fraction of "selecting a caramel" after selecting a dark chocolate and eating it. find the perimeter of a semi circle whose diameter is 21cm Consider two points on the production possibilities frontier (PPF): point A, at which there are 50 oranges and 100 apricots, and point B, at which there are 51 oranges and 98 apricots. If the economy is currently at point B, the opportunity cost of moving to point A is Cain Companys management engaged Bell, CPA, to audit the effectiveness of Cains internal control over financial reporting. Bells report, which was accompanied by managements separate report presenting its written assessment about the effectiveness of internal control, described several material weaknesses and potential errors and fraudulent activities that could occur. Subsequently, management included Bells report in its annual report to the board of directors with a statement that the cost of correcting the weaknesses would exceed the benefits. Bell should why should we use CER method when approaching a question the_______ is a documents , spreadsheet or database that contain personalized information or data base such as name address phone number please help on how to get last few marks Which statement correctly applies to a spinning mobile that changes its velocity over a period of time?A. The combination of all forces acting on it is zero.B. No net force is acting on it. C. Forces are acting on it.D. A nonzero net force is acting on it. The Electoral College was created to:prevent a single region of the country from having too much political power.give larger cities more political power.divide power equally between both houses of Congress.prevent a single political party from becoming too powerful. The pipe fitting industry had 546.5 thousand jobs in 2015 and is expected to decline at an average rate of 3 thousand jobs per year from 2015 to 2025. Assuming this holds true, what will be the pipe fitting's percent change from 2015 to 2025 The volume of a cylindrical soup can is represented by the expression r3 + 7r2, where r is the radius of the cylinder. Which statement best interprets the factor (r + 7) in this context Experts in model airplanes develop a supersonic plane to scale, it moves horizontally in the air while it is conducting a flight test. The development team defines that the space that the airplane travels as a function of time is given by the function: e (t) = 9t 2 - 6t + 3 Determine what acceleration the scale airplane has (Second derivative). Can someone explain how to do these kind of problems in the most understandable way please I am struggling to learn it thank you. Plz help!!!! Number 23 Describe the process by which a main sequence star turns into a black dwarf.(draw a flow chart)