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
3. Q3: India is a user who needs to be able to see a list of the names of her friends (those whom she considers friends). There
Katyanochek1 [597]

In order to grant India access to a list of her friends, you should use a query by selecting name from person and use the inner join relationship on person.

<h3>What is query?</h3>

A query refers to a computational request for data that are saved in a database table, from existing queries, or even from a combination of both a database table and existing queries.

In this scenario, you can grant India access to be able to see a list of her friends with a structured query language (SQL) by selecting name from person and use the inner join relationship on person.

Read more on query here: brainly.com/question/25266787

3 0
2 years ago
Witch of the following attributes of a website indicates a more reliable source for information
Arada [10]
The only one of those I would trust is the site ending with EDU I hope this helps you.
4 0
3 years ago
Which of the following color palettes for the BackColor and ForeColor properties contains colors that are guaranteed to be displ
Norma-Jean [14]

Answer: 1)System Palette

Explanation: System palette is kind of palette found in the system which contain the color values that is used by the display.This palette is also  drawing of the devices and applications.But the application don't get the direct access to the system palette rather logical palette permits it.

They work on the basis of the properties carried from the Back color and Fore color.Other palettes mention in the option is incorrect because these palettes don't work for the operating system's display .Thus the correct option is option(1).

8 0
3 years ago
What is it called when you let the mouse pointer pause for a moment or two over an item?
katovenus [111]

When you let the mouse pointer pause for a moment or two over an item, it is called Hovering. Hovering means positioning the pointer to a specific object without clicking yet any mouse buttons. You also do not move it for at least a second. Hovering the mouse pointer may have the targeted object display its infotip or tooltip. 

8 0
3 years ago
If you have access to an ssn, but do not have permission to view certain folders or documents in that ssn, those folders and doc
hodyreva [135]
<span>If I remember it correct, if you have access to an ssn, but do not have permission to view certain folders or documents in that ssn, those folders and documents will be hidden. Or it depends on OS. But in most ways its hidden or masked.</span>
5 0
3 years ago
Read 2 more answers
Other questions:
  • What was the second phone?
    14·1 answer
  • How many bit does four gigabyte has
    8·2 answers
  • Which of the below statements describes the purpose of HTML 5 - check as many as apply
    9·1 answer
  • A 1000 elements array is used to store integers ascending order . The array is used to search binary search algorithm for the in
    14·1 answer
  • Alexi is writing a program which prompts users to enter their age. Which function should she use?
    6·2 answers
  • Create a game that rolls two dies (number from 1 to 6 on the side) sequentially for 10 times (use loop). If at least once out of
    14·1 answer
  • Change the following sentences using 'used to
    12·1 answer
  • Which platforms are used for mobile apps? Select 4 options.
    7·1 answer
  • Your motherboard has sockets for 184-pin dimm ram. which type of ram should you install?
    15·1 answer
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!