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
Ilia_Sergeevich [38]
3 years ago
11

Q. Questions 7-8 refer to the following method public void printVals(String[] items, int k) { if(k > 1) { printVals(items, k

- 1); System.out.print(items[k] + " "); printVals(items, k - 2); } } Suppose the following code segment has been executed. String[] names = {"Pat", "Joe", "Ann", "Cal", "Amy"}; printVals(names, name.length - 1); 7.What is the output?
Computers and Technology
1 answer:
kicyunya [14]3 years ago
4 0

Answer:

Ann Cal Amy Ann  is the correct output.

Explanation:

<u>Following are the description for the output</u>.

In the above program of the Java Programming Language, set a public void data type function 'printVals' and pass string type argument 'items' and integer type argument 'k' and inside the it.

  • Set the if conditional statement to check the variable 'k' is greater than 1.
  • Then, print the items of the variable 'k' by adding space in it.
  • Finally, set a string data type array variable that is 'names' and pass the following string values and call the following function.
You might be interested in
________ hackers break into systems for non-malicious reasons such as to test system security vulnerabilities. black-hat gray-ha
Masteriza [31]
<span>These are white-hat hackers. They are typically hired by the company doing the testing as a way of making sure that there are no bugs or holes in the code or program that could be exploited. The ethical hacker would look for ways to get around these issues and helps the company strengthen their programs or sites.</span>
3 0
3 years ago
____ deals with ensuring that data is protected against unauthorized access, and if the data are accessed by an authorized user,
Irina-Kira [14]
The correct answer is usually referred to as '<span>confidentiality'.</span>
4 0
4 years ago
Which platforms are used for mobile apps? Select 4 options.
Grace [21]

Answer:

ios, aNDROID, BLUETOOTH , AND BLACK BERRY

Explanation:

6 0
3 years ago
Additional chemical hazards training must be provided to employees:
poizon [28]
B when new hazards are introduced into the workplace
7 0
3 years ago
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output
Alex787 [66]

Answer:

import java.util.*;

public class Main{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

 int intgVal; double dblVal; char chrVal; String strVal;

 System.out.print("Enter integer: ");  

 intgVal = input.nextInt();

 System.out.print("Enter double: ");  

 dblVal = input.nextDouble();

 System.out.print("Enter character: ");  

 chrVal = input.next().charAt(0);

 input.nextLine();

 System.out.print("Enter string: ");  

 strVal = input.nextLine();

 System.out.println(intgVal+" "+dblVal+" "+chrVal+" "+strVal);

 System.out.println(strVal+" "+chrVal+" "+dblVal+" "+intgVal);

 int IntValue = (int) dblVal;

 System.out.print("Cast to an integer: "+IntValue);

}

}

Explanation:

See attachment for complete program where comments were used to explain each line of the program

Download txt
6 0
4 years ago
Other questions:
  • Playville is a tiny town in fictional middle earth, which is inhabited by dwarves and elves. Playville has a playground to which
    6·1 answer
  • Identify the correct software or hardware applications in the passage below
    10·1 answer
  • Binary code what does this mean I was sick so I don't under stand
    7·2 answers
  • Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by a space a
    10·1 answer
  • You are the IT administrator for a small corporate network. Recently, you added a web server that runs services that need to be
    12·1 answer
  • Diane is receiving a lot of unwanted e-mail. What steps can she take to reduce the amount of e-mail she receives?
    12·1 answer
  • What is the output of the C++ codeabove?
    14·1 answer
  • What is the reasoning you would write an inquiry to a company?
    5·2 answers
  • What are the columns in a Microsoft Access table called?
    15·1 answer
  • What is the console.log function for?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!