subject

Write the definition of a method printattitude, which has an int parameter and returns nothing. the method prints a message to standard output depending on the value of its parameter. if the parameter equals 1, the method prints disagree if the parameter equals 2, the method prints no opinion if the parameter equals 3, the method prints agree in the case of other values, the method does nothing. each message is printed on a line by itself. here is what i have so far that is being marked incorrect: public static void printattitude (int x){if (x==1){system. out. println("disagree"); }if (x==2){system. out. println("no opinion"); } if (x==3){system. out. println("agree"); }}here is the error message that i get: - nothing was printed to stdout- stdout is not correcttest case tabletest case x stdout feedback#1 1 disagree#2 2 no opinion#3 30 - stdout is not correct- nothing was printed to stdout#4 9 - stdout is not correct- nothing was printed to stdout

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
What are compression artifacts? 1) visible defects in the picture caused by the nature of the compression algorithm. 2) numbers that tell a web server how much to compress a picture for faster transmission. 3) invisible defects in the picture preserved by lossless compression. 4) numbers that tell a photo editing program how much to compress a picture for faster transmission.
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 24.06.2019 17:50
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
question
Computers and Technology, 24.06.2019 19:20
Which command suppresses the visibility of a particular row or column in a worksheet?
Answers: 1
You know the right answer?
Write the definition of a method printattitude, which has an int parameter and returns nothing. the...
Questions
question
Mathematics, 04.12.2021 01:00
question
Mathematics, 04.12.2021 01:00
question
English, 04.12.2021 01:00