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
vodka [1.7K]
3 years ago
13

Consider the following method.

Computers and Technology
1 answer:
Akimi4 [234]3 years ago
3 0

Answer:

The output of the given code as follows:

Program:

public class Main //define class

{

   public static void printSomething (int num, boolean val) //define method.

{

   num--; //decrease value by 1.

   System.out.print(val); //print value.

   System.out.print(num); //print value.

   

}

public static void main(String[] args) //main method

{

   printSomething(1, true); //calling function

   printSomething(2, true); //calling function

}

}

Output:

true 0

true 1

Explanation:

In the question, it is given there is a method that is "printSomething" is defined. This method accepts two parameters that are num and val. where num is an integer variable and val is boolean variable that holds two values only that are true or false. inside the method, we decrease the value of the num variable by 1 and then we print the value of val and num variable. This function does not return any value because we use return type void.

The function is defined in the same class so, we call the function two times that can be described as:

  • In first time calling we pass 1 and true value in function so it will "print true 0".
  • In second time calling we pass 2 and true value in function so it will "print true 1".

You might be interested in
True or False <br> Hebrew Bible and the Koran were first written in English.
lilavasa [31]

Answer:

<h2>FALSE </h2>

THE TWO HOLY BOOK, QUR AN AND HEBREW BIBLIE WAS WRITTEN IN THEIR NATIVE LANGUAGES, FOR EXAMPLE, KORAN IS WRITTEN IN ARABIC AND THE BIBLE WAS WRITTEN IN GREEK AND HEBREW. ACTUALLY THEY WERE TRANSLATED SO EVERYONE CSN UNDERSTAND WHAT IT SAYS.

BRAINLIEST PLEASE

❤❤❤❤❤❤❤❤

6 0
3 years ago
During the Requirements Definition stage of a systems development​ project, the employees who will be the primary users of the n
Lisa [10]

Answer:

enabling users to contribute to requirements for new system features and functions

Explanation:

Based on the scenario being described within the question it can be said that the main responsibility that is being violated is enabling users to contribute to requirements for new system features and functions. They are responsible for gathering user feedback, in order to get a sense of what the user's like and dislike regarding a system in order to later make the necessary changes needed to the system.

8 0
3 years ago
Write the Python programs for the
ArbitrLikvidat [17]

Answer:

num = int(input("Enter a number: "))

if (num % 2) == 0:

print("{0} is Even number". format(num))

else:

print("{0} is Odd number". format(num))

4 0
3 years ago
What do economists call a decline in the real GDP combined with a temporary rise in price level?
ad-work [718]
A <span>stagflation is my answer.</span>
3 0
3 years ago
Read 2 more answers
Need help plz 100 POINTS
steposvetlana [31]

Answer:

salamat sa points wreker

7 0
3 years ago
Read 2 more answers
Other questions:
  • The Modified Greiss chemical test is used to detect the presence of what chemicals that indicate muzzle to target distance?
    11·1 answer
  • What is the full form of the acronym WWW?
    13·2 answers
  • What is the name of the contextual or specific tab that appears in page layout view when adding a header
    15·1 answer
  • Trina Hauger works for Johnson Electric as a corporate lawyer, and part of her duties are to ensure the ethical and legal use of
    13·1 answer
  • What connectionless protocols are implemented at the lower layers of the OSI model, what is usually used to acknowledge that the
    5·2 answers
  • A healthcare organization received notification that a hospital employee’s laptop that contained PHI was inadvertently left at a
    14·1 answer
  • An ip address in the address range 169.254.x.y, used by a computer when it cannot successfully lease an ip address from a dhcp s
    6·1 answer
  • Hey im b---o---r---e---d dont report cuz if u do ur l a m e :)
    14·1 answer
  • Which is a linear presentation?
    10·1 answer
  • Pleaseee help me with the typical situations of the icons(i already know for words but I have no idea for giving the situations
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!