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
Vera_Pavlovna [14]
2 years ago
7

For java

Computers and Technology
1 answer:
Sedbober [7]2 years ago
8 0

Answer:

public class array{

    public static void main(String []args){

       int[] array = {2,4,7,1,9};

       int num_vals = array.length;

       for(int i=0;i<num_vals;i++){

           

           System.out.println(array[i] + " ");

       }

       for(int i=num_vals-1;i>=0;i--){

           

           System.out.println(array[i] + " ");

       }

    }

}

Explanation:

First create the class in the java programming.

Then create the main function and declare the array with values.

Store the size of array in num_vals variable by using the function array.length.

create a for loop to iterate the each element in the array and then print on the screen with spaces and newline.

it traverse the loop from first to last.

Then, again create the for loop to iterate the each element in the array and then print on the screen with spaces and newline but the traversing start from last to first.

You might be interested in
Sara is a college student studying accounting. She uses a laptop daily for personal and course work. What data might Sara have o
polet [3.4K]

Answer:

Sara: Personal data

Jorge : Personal data + official data.

Wanda: Personal data + students data

Carl: Personal data + official data

Explanation:

Personal data could contain pictures, social security numbers, banking transactions details, passwords, credit card information etc.

Jorge's official data could contain information about various sources that he gets his news from. It could contain password information about his official email. And he connects to the office network, he might pose a threat to the entire network if his PC is infected.

Wanda could leak the student's information. She could also leak her social security numbers, bank details, organization's details etc.

Carl could leak company's information. He can avoid it by staying away from public networks. Installing anti-virus. He should also take great care while accessing various sites and never download harmful files over the internet.

8 0
3 years ago
Yo who do u add a pic on here
Juliette [100K]
Go to the me colum when you first open the app
8 0
3 years ago
What is the khan academy game where it is a block having to jump over lava and is an endless runner
saw5 [17]

Answer:https://www.khanacademy.org/computer-programming/lava-the-impossible-game-by-swax97/4638717300965376/embedded?id=1436456095000-0.5&origin=undefined&buttons=yes&embed=yes&editor=no&author=yes

Explanation:

5 0
3 years ago
In what domain electrica energy is the most use
amm1812

Answer:the main signal bearing entities are voltage and their current in circuit environments.

Explanation:

5 0
2 years ago
Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer va
padilas [110]

Answer:

The code to this question as follows:

Code:

if(x < y) //if block that check value of x less then value of y

{

if(x<z) // inner if block that check value of x less then value of z

{

min = x;  //assign value of x in min variable

}

else // inner else block when condition is false

{

min = z;  //assign value of z in min variable

}

}

else //outer else block

{

if(y<z) //if block to check value of variable y is less then value of z

{

min = y;  //assign value of y in min variable

}

else //else block

{

min = z;  //assign value of z in min variable

}

}

Explanation:

In the given question it is defined, that an integer variable " x, y,z, and min" is declared, in which variable "x,y, and z" value is defined, and the variable is used to assign a big value.

  • To check the biggest value we use the if-else statement in which, and if block check value of x is less than then the value of y if this condition is true so, inside this another if block declares, that will check if the value of x is less then z. if this is true, it will assign the value of x in min variable else it will assign the value of z in min.
  • In the outer else part, another conditional block has used, that checks if the value of y is less than then the value of z if it is true, it assigns the value of y in min else it will assign the value of z in min.
8 0
2 years ago
Other questions:
  • You can put a small level on your camera to help keep the horizons straight? TRUE OR FALSE
    14·2 answers
  • House real estate summary Sites like Zillow get input about house prices from a database and provide nice summaries for readers.
    11·1 answer
  • What is a expansion card for computer?
    5·1 answer
  • What is one way to improve the upward flow of information?
    12·1 answer
  • An organization is developing an authentication service for use at the entry and exit ports of country borders. The service will
    10·1 answer
  • When you heat a pot on a stove, the handle gets warm. which type of heat transfer is possible
    10·2 answers
  • Why can't I register for Brainly?? I've been trying for months, too! I've noticed this question has been asked so many times, bu
    7·1 answer
  • WHAT DOES THE SCRATCH CODE BELOW DO?
    7·1 answer
  • Design a program that asks the User to enter a series of 5 numbers. The program should store the numbers in a list then display
    14·1 answer
  • A system engineer enhances the security of a network by adding firewalls to both the external network and the internal company n
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!