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
stira [4]
3 years ago
11

What is the output produced by the following lines of code? int value1 = 3; int value2 = 4; int result = 0;result = value1++ * v

alue2--;System.out.println("Post increment/decrement: " + result);result = ++value1 * --value2;System.out.println("Pre increment/decrement: " + result);
Computers and Technology
1 answer:
posledela3 years ago
6 0

Answer:

<u>Output</u>:

Post increment/decrement: 12

Pre increment/decrement: 10

Explanation:

In the above code that is written in the Java Programming Language.

  • Set three integer variables and assign value in it "value1" to 3, "value2" to 3, "result" to 0.
  • Increment in the variable "value1" by 1 i.e., 4 and multiply by decrement in the variable "value2" by 1 i.e., 3 and store their multiplication in the variable "result" i.e., 12.
  • Print the value of the variable "result" with message.
  • Again increment in the variable "value1" by 1 i.e., 5 and multiply by decrement in the variable "value2" by 1 i.e., 2 and store their multiplication in the variable "result" i.e., 10.
  • Again print the value of the variable "result" with message.
You might be interested in
Which statement describes the primary purpose of JavaScript?
cupoosta [38]

a.The primary purpose of JavaScript is to enable features such as validation of forms before they are submitted to the server.

<u>Explanation:</u>

On web pages before submitting the day, end user has to do client validations such as whether data enter is correct data type,  so end user for  client side validation been eiher by VBSCRIPT (visual basic script language) or (JavaScript java script).  Internet explorer or Microsoft edge uses VBSCRIPT for web page validation.

For visual basic script languages end user should have enough knowledge   on visual basic programming languages. Same away for java script end user have enough knowledge on c language.

Both Scripts are used for client side validation on success of validation end user will submit web page form for next action. JavaScript is used in most of the browser including Microsoft explorer or Microsoft edge.

5 0
3 years ago
Which mechanism transmits rotary motion to reciprocating?
weqwewe [10]
The mechanism transmits rotary motion to reciprocating is the crank and slider. <span>A crank and slider mechanism changes straight-line motion into rotation motion. Typically found in piston engines or piston pumps, this design consists of a rod that connects to a rotating driving beam and a sliding body.</span>
5 0
3 years ago
Who is known as Father of Computer?
MrMuchimi
<h2>• Father=Charles Babbage</h2>

<h2>• Mother=Ada Lovelace</h2>

\\  \\  \\  \\

6 0
2 years ago
Read 2 more answers
What is an RGB value?
jasenka [17]
Color's RGB value indicates its red, green, and blue intensity. Each intensity value is on a scale of 0 to 255, or in hexadecimal from 00 to FF.

RGB values are used in HTML, XHTML, CSS, and other web standards. For more, including visual samples and RGB values, see:
5 0
3 years ago
Can someone tell me what this means it’s on my phone and it’s not been working for days ASAP REPLYS THANK YOU
bixtya [17]
Plug it into your computer I think
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which network could NOT carry commercial traffic?
    5·1 answer
  • Which of these jobs would be most appropriate for someone who majors in computer engineering? I need the answer ASAP Helping com
    14·2 answers
  • Is backing up computer files done on the hard drive?
    5·1 answer
  • 1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the elements in the sideb
    14·1 answer
  • Error messages begin with the ____ symbol.
    6·2 answers
  • A technician receives an invalid certificate error when visiting a website with port 443 enabled. Other computers on the same LA
    8·1 answer
  • I'm confused. Are , , and elements or nodes? What exactly defines nodes? What defines elements?
    13·1 answer
  • What is the hexadecimal equivalent of the decimal number 256?
    11·1 answer
  • What type of culture is computer hardware?
    6·2 answers
  • Create a class named Employee. The class must contain member variables for the employee name and salary. It should contain gette
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!