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
Paha777 [63]
3 years ago
10

Create a stack with three integers and then use .toarray to copy it to an array.

Computers and Technology
1 answer:
Marizza181 [45]3 years ago
6 0

Answer:

import java.util.*;

import java.lang.*;

import java.io.*;

class Codechef

{

public static void main (String[] args)

{

    Stack<Integer> mat=new Stack<Integer>();

    mat.add(1);

    mat.add(3);

    mat.add(6);

    System.out.println(mat);

    Object [] a=mat.toArray();

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

    System.out.println(a[i]);

}

}

Explanation:

An integer type stack st is created;

1,3 and 6 are added to the stack.

printing the contents of the stack.

array a is created form the stack using toArray().

Then printing the array.

You might be interested in
Whichof the following is not a standard method called as part of the JSPlife cycle?jspInit()jspService()_jspService()jspDestroy(
olga nikolaevna [1]

Answer:

jspService()

Explanation:

These are the steps in JSP life cycle-

1. We have to convert JSP page to Servlet.

2.Then we compile the JSP page which convert it into test.java

3. In test.java ,we load the classes(test.class) in container.

4. Object(instance) is created in container .

5. Then, we initialize the init() method at the time of servlet generation.  

6. After the initialization,for the requests we use _jspService() method to serve the incoming requests from JSP.

7. When the work of JSP is completed, we remove it from container by the help of jspDestroy() method.

There is no jspService() method in the JSP life cycle.

7 0
3 years ago
Determine whether the compound condition is True or False. 2&lt;3 and 5&lt;1.3&lt;3 and 1≤1. not (2==3). true false cannot be de
seraphim [82]

Answer:

False

Explanation:

The second bool operation results to false since 5 is not less than 1.3

5 0
3 years ago
Read 2 more answers
When writing professional emails, it is okay to use emoticons and
nekit [7.7K]

Answer:

False

Explanation:

8 0
3 years ago
Read 2 more answers
(Best Buy Part A) At a Best Buy store, the forecast for the annual demand of a Motorola cell phone is 15600. Demand forecasts ar
Nataly_w [17]

Explanation:

a. The computation of the economic order quantity is shown below:

= \sqrt{\frac{2\times \text{Annual demand}\times \text{Ordering cost}}{\text{Carrying cost}}}

= \sqrt{\frac{2\times \text{\15,600}\times \text{\$400}}{\text{\$5}}}

= 1,580 units

The carrying cost is

= $50 × 10%

= $5

b. The number of orders would be equal to

= Annual demand ÷ economic order quantity

= 15,600 ÷ 1,580

= 9.87 orders

Ordering cost = Number of orders × setup cost per order

= 9.87 orders × $400

= $3,949.37

c. The average inventory would equal to

= Economic order quantity ÷ 2

= 1,580 units ÷ 2

= 790 units

Carrying cost = average inventory × carrying cost per unit

= 790 units × $5

= $3,950

c. Now the total cost

= Setup cost + carrying cost

= $3,949.37 + $3,950

= $7,899.37

8 0
3 years ago
The determination of the overall system architecture consisting of a set of physical processing components, hardware, software,
Masteriza [31]

Answer:

Systems engineering is the process of planning, designing, and implementing a system or systems.

7 0
2 years ago
Other questions:
  • A(n) _____ can be used to convert digitized documents into ascii (american standard code for information interchange) text that
    6·1 answer
  • Shelby likes to play video games on an old Atari video game system. No matter how old the cartridge, when she inserts it into th
    14·2 answers
  • 2.3 Code Practice: Question 3
    14·1 answer
  • I plugged my headphones into my computer, but the sound still came out of the speakers. help!
    6·2 answers
  • There are some network modeling tools that can ________ the existing network.
    12·2 answers
  • Which type of application architecture has a logic tier
    15·2 answers
  • In Scheme, the form (symbol-length? 'James) will return: Group of answer choices 0 5 6 error message
    11·1 answer
  • Give two reasons why it is not advisable to open email from unknown sources​
    13·2 answers
  • All languages require the code which is simply a word that means _____.
    9·1 answer
  • Accessibility is the degree to which a product or service is readily available and usable by _____.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!