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
The best way to share criticism is to ______. a. write it in the break room b. talk it about with all your coworkers c. talk abo
ICE Princess25 [194]

Answer:

C.

Explanation:

6 0
3 years ago
Read 2 more answers
How people select, interpret, remember, and use information to make judgments and decisions is called __________.
Svetradugi [14.3K]

Answer: Social Cognition

Explanation: hope this helps

6 0
3 years ago
Which type of software is offered in trial form or for a limited period of time?
kkurt [141]

The type of software which is offered in trial form or for a limited period of time is called shareware.

Software which are offered for free in trial form or for a limited time period are called shareware. They operate on the principle that once the user understands what the software can offer they will pay to use it later.

Most shareware software has built in countdowns which start as soon as you start the trial and at the end of which access is automatically revoked. They require the user to form a simple account. These versions generally provide a very basic selection of functions and are used to rake in more paying users.

Types of shareware include:

  1. Adware: It stands for advertising-supported software where the advertisements generate revenues.
  2. Demoware: This is a trial version of the original software including all features.
  3. Crippleware: This software is free but provides limited features till it is purchased.
  4. Trialware

This provides the user with full feature access for a time limit and then requires purchase.

You can learn more about shareware software at

brainly.com/question/4593389

#SPJ4

3 0
1 year ago
I WILL GIVE THE CROWN IF CORRECT
alisha [4.7K]

Answer:

foundations

Explanation:

7 0
3 years ago
Read 2 more answers
Search engine bing offers
scoundrel [369]
Bing offers work pretty good, I have gotten the rewards a couple of times
6 0
3 years ago
Other questions:
  • What are the names of first generation computers?
    12·1 answer
  • what is the restaurant with the black pom tree and yellow backround three letter name from hi guess the restaurant
    14·2 answers
  • Which osi layer is responsible for combining bits into bytes and bytes into frames?
    8·1 answer
  • Charlie is taking his slide presentation to a meeting at a remote location. He saves his presentation as a package on a CD. Char
    15·2 answers
  • Websites that group individuals and organizations into clusters or groups based on some sort are considered to be what type of n
    11·1 answer
  • shapes polymorphism Create a set of classes derived from an abstract class Shape, which provides a common interface, for managin
    7·1 answer
  • Ryan is looking to buy a new HDTV set. He knows from friends that LCD set screens reflect less light than plasma set screens, bu
    10·1 answer
  • What is not a benefit of exploring tabs and groups in Microsoft Word?
    9·2 answers
  • Which type of computer is used to process large amount of data​
    15·2 answers
  • What is computer?explain any five characteristic in short.​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!