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
USPshnik [31]
3 years ago
14

Write code that prints: userNum ... 2 1 Print a newline after each number. Ex: userNum

Computers and Technology
1 answer:
ehidna [41]3 years ago
4 0

Answer:

The program to this question can be given as follows:

Program:

public class data //defining class data

{

//main method

public static void main (String [] as) //declaring main method  

{

int userNum = 4; //declare variable userNum and assign value

for (userNum = 1; userNum <= 4; userNum++)  //loop for print values

{

System.out.println(userNum);  //print values in new lines.

}

}

}

Output:

1

2

3

4

Explanation:

In the above java program code firstly a class "data" is defined, inside this class the main method is defined in which an integer variable userNum is defined that holds a value that is "4".

  • In this method, a for loop is declare that uses variable userNum which starts from 1 and ends with a given value that is equal to 4.
  • Inside a for loop, the print function is used that print userNum variable each values in the newline.  

You might be interested in
Edible vaccines, a more controversial approach to vaccine development, have been investigated by scientists. Plants can be genet
madreJ [45]
I need some more information. If you need any more help with this please leave a relpy.
8 0
4 years ago
Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
horsena [70]

The process that involves writing down your main ideas, subpoints, and supporting material, then using geometric shapes is mapping.

This includes uses of  arrows to indicate logical relationships.

<h3>What is mapping?</h3>

mapping can be regarded as the prescribed way of assigning an object to each object in one set a particular object.

Learn more about mapping at:

brainly.com/question/25168859

7 0
3 years ago
A power supply unit for a computer converts:
Vinvika [58]
A power supply unit (or PSU) converts mains AC to low-voltage regulated DCpower for the internal components of acomputer. ... Some power supplies have a manual switch for selecting input voltage, while others automatically adapt to the mains voltage.
5 0
3 years ago
PLEASE HELP I WILL GIVE YOU BRAINLILY
sasho [114]

Answer:

increasing its upload speed

it just speeds it up

7 0
3 years ago
Read 2 more answers
Need to know? Anyone feel like helping me not fail
8_murik_8 [283]
I’m not sure but i think it might be design
4 0
3 years ago
Other questions:
  • Examine the evolution of the World Wide Web (WWW) in terms of the need for a general-purpose markup language. Provide your persp
    5·1 answer
  • Pamela finds that she is constantly spelling the word “color” as “colour” when she is typing. Even though this is how the word i
    11·1 answer
  • What will be the output after the following code is executed? def pass_it(x, y): z = y**x return(z) num1 = 3 num2 = 4 answer = p
    7·1 answer
  • What is unique about the TODAY and NOW functions?
    15·2 answers
  • Pls help me im confused prob more on the way
    6·1 answer
  • Es costoso construir un robot
    6·1 answer
  • What is a key differentiator for Accenture when delivering Artificial Intelligence (AI) solutions to clients?
    11·1 answer
  • In the program below, which two variables have the same scope?
    9·2 answers
  • You learned that "The CPU interacts with memory in a process that is known as
    6·1 answer
  • Consider the following statement: String myMiddleInitial = “h”;
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!