subject
Computers and Technology, 10.03.2020 16:59 badaxz

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: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:50
What is the difference between windows 7 and windows 10?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 24.06.2019 21:40
Which of these is not a type of socket? aga (alternating grid array) pga (pin grid array) spga (staggered pin grid array) lga (land grid array)
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, 30.04.2021 06:10
question
Mathematics, 30.04.2021 06:10
question
Chemistry, 30.04.2021 06:10
Questions on the website: 13722367