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]
2 years ago
13

Consider the following method.

Computers and Technology
1 answer:
Akimi4 [234]2 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
When naming a file to upload into an assignment in blackboard, it is okay to use special characters?
tatiyna

No, you cannot name a file to upload into an assignment in Blackboard using special characters such as #, ~, @, $, %, &, *.

So therefore, the answer is False.

7 0
2 years ago
To instruct Oracle11 g to sort data in ascending order, enter ____ after the column name in the ORDER BY clause.
Paha777 [63]

Answer:

A. ASC

Explanation:

In Oracle11 g ORDER BY clause is used to sort data andit is also used in mysql ,ms access.Though we not to mention ASC to sort in increasing order because by default it sorts the data in ascending order if we do not mention ASC or DESC.To sort in descending order we have to mention DESC.

So the correct answer to this question is ASC.

7 0
3 years ago
Read 2 more answers
It is important to create an IT security program structure that aligns with program and organizational goals and describes the o
AleksandrR [38]

Answer:

Management and coordination of security-related resources

Explanation:

It is essential to make sure that an information security program is highly secured and non-authorized personnel cannot get access to the program. The security of the program is also important to ensure that valuable information and data of clients are safe. This is one of the most vital in security management.

8 0
3 years ago
कम्प्यूटर में एक समस्या को ठीक करने के लिए एक कार्यक्रम या कोनफीगरेशन परिवर्तन के बाद किए जाते हैं
VARVARA [1.3K]

restart.is done after the computer is passed through configuration

3 0
3 years ago
In unreal engines which class should be used to define the rules of the game
mel-nik [20]

Answer: The number of players and spectators present, as well as the maximum number of players and spectators allowed.

Explanation: players

8 0
3 years ago
Other questions:
  • Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output param
    11·1 answer
  • Which term describes a protocol to manage a network, able to configure a network, monitor activity, and control devices?
    10·2 answers
  • Python provides a special version of a decision structure known as the ________ statement, which makes the logic of the nested d
    13·1 answer
  • An inventory clerk, using a computer terminal, views the following on screen: part number, part description, quantity on hand, q
    8·1 answer
  • How to measure potential energy of a ball?
    14·1 answer
  • Tricking someone to reveal personal information, passwords, and other information that can compromise a security system is known
    13·1 answer
  • Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with
    15·1 answer
  • My phone takes forever to load the ads, does anyone else have this problem? Is there a way to fix it? I’ve tried getting another
    12·2 answers
  • List six features of the Microsoft ​
    10·1 answer
  • The ________ function will change a character argument from lowercase to uppercase. isupper toupper tolarge fromlower none of th
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!