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
gladu [14]
1 year ago
15

Write a method in pseudocode or Java called move that accepts a boolean[], integer value, and a boolean value. Your method shoul

d return a copy of the original array except each element has been moved to the left as determined by the integer parameter.
Computers and Technology
1 answer:
artcher [175]1 year ago
4 0

Writing a code in JAVA computational language it is possible to write a code using the boolean, so it is possible to have the code as:

<h3>Writing the code in latex:</h3>

<em>import java.util.Arrays;</em>

<em>public class BooleanReverse {</em>

<em>public static void main(String[] args) {</em>

<em>boolean arr[] = {true, false, true, true, false, false, false, true, false, false, true, true};</em>

<em>System.out.println("Input boolean array is "+Arrays.toString(arr));</em>

<em>reverseArray(arr);</em>

<em>System.out.println("Output boolean array is "+Arrays.toString(arr));</em>

<em>}</em>

<em>public static boolean[] reverseArray(boolean arr[]){</em>

<em>int i = 0, j = arr.length - 1;</em>

<em>boolean tmp;</em>

<em>while (j > i) {</em>

<em>tmp = arr[j];</em>

<em>arr[j] = arr[i];</em>

<em>arr[i] = tmp;</em>

<em>j--;</em>

<em>i++;</em>

<em>}</em>

<em>return arr;</em>

<em>}</em>

<em>}</em>

See more about JAVA at brainly.com/question/12975450

#SPJ4

You might be interested in
A trench is a narrow excavation in which the depth is greater than the width and the width does not exceed 15 feet. A. False B.
Arturiano [62]
I think it is false
4 0
3 years ago
Read 2 more answers
Complete the AscendingAndDescending application so that it asks a user to enter three integers. Display them in ascending and de
Andreas93 [3]

Answer:

Following are the solution to the given question:

import java.util.Scanner;//import package

public class AscendingAndDescending//defining a class AscendingAndDescending  

{

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

   {

       int n1,n2,n3,min,max,m;

       Scanner in = new Scanner(System.in);//creating Scanner class object

       System.out.print("Enter an integer: ");//print message

       n1 = in.nextInt();//input value

       System.out.print("And another: ");//print message

       n2 = in.nextInt();//input value

       System.out.print("And just one more: ");//print message

       n3 = in.nextInt();//input value

       min = n1; //use min variable that holds value

       max = n1; //use mix variable that holds value

       if (n2 > max) max = n2;//use if to compare value and hols value in max variable

       if (n3 > max) max = n3;//use if to compare value and hols value in max variable

       if (n2 < min) min = n2;//use if to compare value and hols value in min variable

       if (n3 < min) min = n3;//use if to compare value and hols value in min variable

       m = (n1 + n2 + n3) - (min + max);//defining m variable that arrange value

       System.out.println("Ascending: " + min + " " + m + " " + max);//print Ascending order value

       System.out.println("Descending: " + max + " " + m + " " + min);//print Descending order value

   }

}

Output:

Enter an integer: 8

And another: 9

And just one more: 7

Ascending: 7 8 9

Descending: 9 8 7

Explanation:

In this program inside the main method three integer variable "n1,n2, and n3" is declared that inputs value from the user end and also defines three variable "min, max, and m" that uses the conditional statement that checks inputs value and assigns value according to the ascending and descending order and prints its values.

5 0
3 years ago
The internet maybe best compared to what
attashe74 [19]
The internet can be compared to many stuff, such as a world wide web, or a huge box with stuff and you put in what you want and it comes out! 
6 0
3 years ago
24 ________ are graphical represenattaion of distribution of data. a) bar graph b) pie charts c) histogram d) frequency chart
coldgirl [10]
A bar graph is a great graphical representation of disributiation of data
8 0
3 years ago
How bridges are built over water
Black_prince [1.1K]
It’s all depending on what method
4 0
2 years ago
Other questions:
  • Which function of a web page relies on responsive web design? Adding extra horizontal scroll Blocking mobile devices from viewin
    11·2 answers
  • 24 bit or 16 million colors is often called?
    7·1 answer
  • The number of bits per pixel is called what
    7·1 answer
  • Programmers should strive to _____. increase coupling increase cohesion both of the above neither a nor b
    7·1 answer
  • The chief intellectual property officer (CIPO) is responsible for collecting, maintaining, and distributing the organization's k
    14·1 answer
  • 8.7 Code Practice: Question 2 edhesive
    14·2 answers
  • DRAG DROP -A manager calls upon a tester to assist with diagnosing an issue within the following Python script:#!/usr/bin/python
    11·1 answer
  • Can someone take away your points
    15·1 answer
  • Windows is a GUI Operating System, what is the other type?
    8·1 answer
  • Which window would show you bindings for local area connection 2?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!