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
Dmitry [639]
3 years ago
14

Write a program that initializes an array with ten random integers and then prints four lines of output, containing (Horstmann,

01/2013) Horstmann, C. S. (01/2013). Big Java: Early Objects, 5th Edition [VitalSource Bookshelf version]. Retrieved from vbk://9781118545997 Always check citation for accuracy before use.
Computers and Technology
1 answer:
Amiraneli [1.4K]3 years ago
8 0

Answer:

import java.util.Scanner;

import java.util.Random;

public class Solution

{

public static void indexEven(int[] randomNumbers)

{

System.out.print("Even index elements are: ");

for (int i = 0; i < randomNumbers.length; i++)

{

if (i % 2 == 0)

{

System.out.print(randomNumbers[i] + " ");

}

}

System.out.println();

}

public static void evenelement(int[] randomNumbers)

{

System.out.print("Every even element: ");

for (int i = 0; i < randomNumbers.length; i++)

{

if (randomNumbers[i] % 2 == 0)

{

System.out.print(randomNumbers[i] + " ");

}

}

System.out.println();

}

public static void reverseOrder(int[] randomNumbers)

{

System.out.print("All elements in reverse order: ");

for (int i = randomNumbers.length - 1; i >= 0; i--)

{

System.out.print(randomNumbers[i] + " ");

}

System.out.println();

}

public static void firstLast(int[] randomNumbers)

{

System.out.print("First and last elements are: ");

System.out.print(randomNumbers[0] + " " + randomNumbers[randomNumbers.length - 1]);

System.out.println();

}

public static void main(String[] args)

{

// create instance of Random class

Random rand = new Random();

System.out.print("Array: ");

int[] randomNumbers = new int[10];

for (int i = 0; i < randomNumbers.length; i++)

{

randomNumbers[i] = rand.nextInt(100);

System.out.print(randomNumbers[i] + " ");

}

System.out.println();

indexEven(randomNumbers);

evenelement(randomNumbers);

reverseOrder(randomNumbers);

firstLast(randomNumbers);

}

}

Explanation:

You might be interested in
Which of the following situations best illustrates the process of authentication?a.A Web site sets users' passwords to expire ev
Paladinen [302]

Using an electronic signature on official documentation best illustrates the process of authentication

Further explanation:

The continuous rise of Electronic signatures has made it easier for people to accept signed documents by email or through electronic devices. One good example of electronic signatures is the implementation of digital signatures which broadly encompasses many types of electronic signatures out there. Digital signatures are unique to each signer and follow a standard authentication protocol called PKI. PKI use mathematical algorithms to generate what are known as private and public keys.

A good example is Bob and Jane. Jane sends an eSignature document using her private keys. Bob receives this document with an attached copy of Jane’s public key. The signature will be considered valid if the public key decrypts the signature correctly.

Learn more about eSignatures and electronic signatures.

brainly.com/question/8776017

#LearnWithBrainly

7 0
3 years ago
Is there anybody who knows eris quirk but me- i feel lonely rn ;-;
Nutka1998 [239]

Answer:i do Eri's Quirk allows her to rewind an individual's body to a previous state. She has shown the ability to rewind someone's body to a point before they existed, which she accidentally did to her father.

3 0
3 years ago
Read 2 more answers
Question #1
arlik [135]

Answer:

Pseudocode and flowchart.

Explanation:

I just got it correct.

8 0
3 years ago
an early type of GUI is created, which includes windows, pop-ups, icons, and menus. What year did this happen? Please help!!! qu
Dahasolnce [82]

Answer:

1979

Sources:

Wired

InventHelp

hope i helped :D

3 0
3 years ago
An electronic display that senses physical touch by hands, fingers, or tool such as a stylus is a
devlian [24]
Touch screen might be the answer

Hope this helps
4 0
2 years ago
Other questions:
  • Write c program to check character is alphabate or not?​
    15·1 answer
  • Which protocol can be used to send ipv6 packets over an ipv4 network?
    5·1 answer
  • What is the key benefit of using RAM in a computer?
    12·1 answer
  • Describe how one device can send a bit to another device.
    9·1 answer
  • 9.10: Reverse ArrayWrite a function that accepts an int array and the array ’s size as arguments . The function should create a
    9·1 answer
  • Which column and row references are updated when you copy the formula: =F$5+12?
    14·1 answer
  • What are some of the ways you can use bitlocker encryption? (choose all that apply?
    10·1 answer
  • LAB: Plant information (ArrayList) Given a base Plant class and a derived Flower class, complete main() to create an ArrayList c
    6·1 answer
  • Put these operating systems in order according to the date they were released. (The first to be released would be
    10·1 answer
  • How is information processed within a<br> motherboard between the hard drive, CPU and RAM,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!