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
WARRIOR [948]
3 years ago
8

Write the definition of a method dashedLine, with one parameter, an int. If the parameter is negative or zero, the method does n

othing. Otherwise it prints a complete line terminated by a newline to standard output consisting of dashes (hyphens) with the parameter's value determining the number of dashes. The method returns nothing.
Computers and Technology
1 answer:
ZanzabumX [31]3 years ago
5 0

Answer:

import java.util.Scanner;

public class DashLine {

public static void main(String[] args) {

// Declaring variables

int n;

/*

* Creating an Scanner class object which is used to get the inputs

* entered by the user

*/

Scanner sc = new Scanner(System.in);

// Getting the input entered by the user

System.out.print("Enter a number :");

n = sc.nextInt();

// calling the method by passing the user entered input as argument

dashedLine(n);

}

//This method will print the dashed line for number greater than zer

private static void dashedLine(int n) {

if (n > 0) {

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

System.out.print("-");

}

System.out.println();

}

}

}

Explanation:

You might be interested in
Your team has been asked to design a LAN for a very successful CPA firm with five departments in one building and a total of 560
ziro4ka [17]

Answer:

Please find in attachment.

Explanation:

The details in attachment are self explanatory.

Download docx
5 0
3 years ago
Blood Alcohol Level (BAL) is the ratio between the alcohol consumed and the blood in the body. A. True B. False
horsena [70]
I think its true I'm not sure
3 0
3 years ago
Read 2 more answers
How have productivity programs improved the professional lives of people? (check all that apply)
Zielflug [23.3K]

Productivity programs improved the professional lives of people because:

  • made it easier and faster to communicate with others
  • made it easier to manipulate numbers in a spreadsheet
  • made it easier and less expensive to present information

<h3>What is productivity?</h3>

Productivity is known to be the level of efficiency in regards to the production of goods or services and it is one that is rated by some measure.

Hence, Productivity programs improved the professional lives of people because:

  • made it easier and faster to communicate with others
  • made it easier to manipulate numbers in a spreadsheet
  • made it easier and less expensive to present information

Learn more about productivity from

brainly.com/question/14262252

#SPJ1

7 0
2 years ago
A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule als
Andreyy89

Answer:

The answer is "2"

Explanation:

In the given question, the answer is "2" because if the user is new. so very first, the user creates its account and after creating his account, he will update his account value.

When the user creates its account, the value will be 1, and when he updates its account value. so, the value will be 2, that's why 2 is the correct answer.

4 0
4 years ago
You receive an email that appears to legitimately be from your Bank. The email indicates the need for verification of your infor
anzhelika [568]

Answer:

phishing

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • What is life all about?
    15·2 answers
  • Two different names that refer to the same data item best defines:
    12·1 answer
  • Double clicking a word selects the entire word?
    9·2 answers
  • While inserting images, the Picture command is usually used to insert photos from a digital camera, and the Clip Art command is
    7·1 answer
  • Lenovo's ThinkPad laptop computers is designed in the United States, the case, keyboard, and hard drive are made in Thailand; th
    14·1 answer
  • Select the correct answer from each drop-down menu.
    6·1 answer
  • What do the groups in professional networking sites allow you to do?
    10·1 answer
  • How do I start conversations with ppl??? If u answer right I will try send u more points... So please help me
    7·1 answer
  • The advancement of technology in our daily lives has changed how we interact with the world.
    10·1 answer
  • Digital censorship uses automated, intelligent systems with big data storage to _____. Select 3 options.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!