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
Care should be taken whenever you post comments or photos to any social media or other websites, because each of these online ac
ohaa [14]

Answer:

True is the correct answer for the above question.

Explanation:

  • The social website is used to connect the people using the internet to communicate. With the help of this, any people can communicate within the world's people.
  • If anyone posts their pictures or comment on this type of website, then they need to care for that post or pictures. it means he needs to make decisions to choose the pictures or comments while posting.
  • It is because when the user posts the wrong comments or pictures, then their popularity is less in front of the other people called society.
  • This concept is also said by the question, hence it is a true statement.
5 0
3 years ago
Newt Corporation, headquartered in Los Angeles, is a nationwide provider of educational services to post-graduate students. Due
zysi [14]

Answer:

Option B i.e., Circuit level gateways only enable data to be inserted into a network which is the product of system requests within the network.

Explanation:

In the above question, some details are missing in the question that is options.

Option B is valid because Circuit level gateways are not the transmission inspection, always require information into such a server resulting through system appeal inside the server through maintaining a record for connections that are sent into the server and only enabling information in this is in answer to such queries.

Other options are incorrect because they are not true according to the following scenario.

5 0
3 years ago
Give five examples of top level domain​
coldgirl [10]

Answer:  .com — Commercial businesses.

.org — Organizations (generally charitable).

.net — Network organizations.

.gov — U.S. government agencies.

.mil — Military.

.edu — Educational facilities, like universities.

Explanation:

5 0
3 years ago
Read 2 more answers
¿Cómo las ciencias sociales y la tecnología han modificado tu comunidad?
sergeinik [125]

Answer:

La ciencia y la tecnología han tenido un gran impacto en la sociedad y su impacto está creciendo. ... Al hacer la vida más fácil, la ciencia le ha dado al hombre la oportunidad de perseguir preocupaciones sociales como la ética, la estética, la educación y la justicia; crear culturas; y mejorar las condiciones humanas.

4 0
3 years ago
How to write a survey on cat theory​
nalin [4]
Start with a bold statement then follow with facts solutions problems and theory’s
3 0
2 years ago
Other questions:
  • Your brother is a video producer and is looking to buy some sort of new computing device. he needs a lot of memory and processin
    11·1 answer
  • What test is most similar to binary​
    9·1 answer
  • A vehicle fails an HC emission test at idle and 2,500 rpm, and the engine has an acceleration stumble. The heated oxygen sensor
    15·1 answer
  • 2.13) A simple rule to estimate your ideal body weight is to allow 110 pounds for the first 5 feet of height and 5 pounds for ea
    15·1 answer
  • Importance of producing a hardcopy output​
    15·1 answer
  • Stay safe and search answers up if you need ​
    14·1 answer
  • Match each term in the second column with its correct definition in the first column. Write the letter of the term on the blank
    12·1 answer
  • Why can it be helpful to perform mathematical calculations using programming? Choose the best answer.
    11·1 answer
  • Rohan is creating a presentation with at least 50 slides. He wants the slides to use a consistent layout and formatting. Which o
    12·1 answer
  • Which of the following best describes a balanced reaction
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!