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]
3 years ago
7

For java

Computers and Technology
1 answer:
Sedbober [7]3 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
Which of these is NOT a cloud-based system?
-BARSIC- [3]
Skype isn't a cloud based system. Cloud based systems are online storage systems. Google Drive, Dropbox, and SkyDrive are all pieces of software which allow you to store data on a remote server over the internet. Skype is just a program.
7 0
3 years ago
Helps locate Web pages
mario62 [17]
What do you need help with here?
3 0
4 years ago
Define the missing function. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:
Juliette [100K]

Answer:

#include <iostream>

using namespace std;

class DogLicense{

   public:

       void SetYear(int yearRegistered);

       void CreateLicenseNum(int customID);

       int GetLicenseNum() const;

   private:

       int licenseYear;

       int licenseNum;

};

void DogLicense::SetYear(int yearRegistered) {

   licenseYear = yearRegistered;

}

void DogLicense::CreateLicenseNum(int customID) {

   licenseNum = (100000 * customID) + licenseYear;

}

int DogLicense::GetLicenseNum() const {

   return licenseNum;

}

int main() {

   DogLicense dog1;

   dog1.SetYear(2014);

   dog1.CreateLicenseNum(777);

   cout << "Dog license: " << dog1.GetLicenseNum() << endl;

return 0;

}

Explanation:

You can see the whole code above, but let me explain the fixed function.

void DogLicense::CreateLicenseNum(int customID) {

   licenseNum = (100000 * customID) + licenseYear;

}

The function header is already declared in the class. It takes <em>customID</em> as a parameter. To find out the <em>lisenseNum</em>, we need to apply the given formula <em><u>(100000 * customID) + licenseYear</u></em>.

6 0
4 years ago
Read 2 more answers
Steve is creating a document with proper nouns, which Word continues to identify as being misspelled.
mash [69]

Answer:

it's D. B and C are correct.

Explanation:

The options are:

A. Skip the Spell Checker.

B. Right-click the noun and choose to Ignore All.

C. Right-click and Add to the dictionary.

D. B and C are correct.

You can either right-click the noun and choose to Ignore all. or you can Right-click and add to the dictionary. And this is because you are correct this time, as a proper noun can have misspelled type of spelling. And this is because it is some other language word, and that's why.

6 0
4 years ago
Read 2 more answers
The classification of a particular type of information that determines the types of values you can enter in that field is the:
belka [17]
Fiscal classification should be the answer.
7 0
3 years ago
Other questions:
  • Clicking on this will minimize all open windows.
    5·2 answers
  • What does the hexadecimal number 2D represent in the binary system?
    9·1 answer
  • Imagine you are building an ATM system; list at least 6 application domains for the system. That is, in which context is the sys
    13·1 answer
  • Chapter 12 Reading Question 19 The most distinguishing characteristic of geographical information systems is: Every record or di
    5·1 answer
  • Sarah has entered data about football players from team A and team B in a worksheet. She enters names of players from team A wit
    9·2 answers
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • LAB: Count multiples (EO)
    5·1 answer
  • Select the correct answer from each drop down menu
    8·2 answers
  • What happen if file server stops working?
    5·1 answer
  • What is the advantage of learning through story compared to learning through personal experience?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!