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
dimaraw [331]
3 years ago
9

What keyword do we use to tell Java to set aside memory to create an object?

Computers and Technology
1 answer:
Pavel [41]3 years ago
5 0

Answer: You reserve memory locations for an array when you _____.

use the keyword new

You might be interested in
We have constructed a Player Class for you. Add the following: public static variable: int totalPlayers Static variable should b
Margaret [11]

Answer:

public class Player {

   public static int totalPlayers = 0;

   public static int maxPlayers = 10;  

   public static boolean gameFull() {

       return totalPlayers >= maxPlayers;

   }

   public Player() {         // Player class constructor

       totalPlayers++;

   }

}

Explanation:

The Java program defines the class Player which has two public class variables and a public method. The class constructor increases the totalPlayer variable by one for every player object created.

5 0
4 years ago
Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
snow_tiger [21]

Answer:

The program implemented in C++ is as follows:

#include <iostream>

#include <vector>

using namespace std;

int main(){

int lenlist;

vector<int> mylist;

cout<<"Length List: ";

cin>>lenlist;

mylist.push_back(lenlist);

int i =0; int num;

while(i<lenlist){

   cin>>num;

   mylist.push_back(num);  

   i++;

}

int min,max;

cout<<"Min: ";  cin>>min;

cout<<"Max: ";  cin>>max;

cout<<"Output!"<<endl;

for(int i=1; i < mylist.size(); i++){

  if(mylist.at(i)>=min && mylist.at(i)<=max){

      cout<<mylist.at(i)<<" ";

  }

}

  return 0;

}

Explanation:

This declares the length of the list as integer

int lenlist;

This declares an integer vector

vector<int> mylist;

This prompts user for length of the list

cout<<"Length List: ";

This gets input of length of the list from the user

cin>>lenlist;

This pushes user input to the vector

mylist.push_back(lenlist);

int i =0; int num;

The following iteration gets user inputs and pushes them into the vector

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

<em>    cin>>num; </em>

<em>    mylist.push_back(num);  </em>

<em>    i++; </em>

<em>} </em>

This declares min and max variables

int min,max;

This prompts user for the lower bound

cout<<"Min: ";  cin>>min;

This prompts user for the upper bound

cout<<"Max: ";  cin>>max;

The following iteration checks for numbers within the lower and upper bound and print the numbers in that range

<em>cout<<"Output!"<<endl; </em>

<em>for(int i=1; i < mylist.size(); i++){ </em>

<em>   if(mylist.at(i)>=min && mylist.at(i)<=max){ </em>

<em>       cout<<mylist.at(i)<<" "; </em>

<em>   } </em>

<em>} </em>

3 0
3 years ago
A(n) ______ disk is a storage device that contains one or more inflexible, circular platters that use magnetic particles to stor
Delvig [45]
Hard






----------------------------------------------
5 0
3 years ago
Which cloud computing element that gives a service provider the ability to dynamically allocate shared physical resources to mul
borishaifa [10]

Answer:

Resource Polling is the correct answer to the given question .

Explanation:

The Resource pooling is used in cloud computing frameworks that describe a situation where companies offer temporary and flexible resources to different clients .In the resource polling the programs can be changed to fit the needs of each client without making any adjustments visible to the client.

The main function of resource pooling that it grants a service provider the opportunity to dynamically allocate common physical resources to different clients based on the utilization criteria of each client.

5 0
3 years ago
Aristotle came up with many reasons why statesmen should know all the different types of
leonid [27]
So states men could be reelected
7 0
4 years ago
Other questions:
  • Which type of computing refers to firms purchasing computing power from remote providers and paying only for the computing power
    7·1 answer
  • Describe the use of technology in the promotional function
    5·2 answers
  • Consider the following class definitions. public class BClass { private int x; public void set(int a) { x = a; } public void pri
    5·1 answer
  • Out of a list of the values 8, 3, 30, 5, 15, and 6, what result would the MIN function return?
    9·2 answers
  • What is NOT a built-in function in python?<br> sqrt()<br> string()<br> fabs()<br> O print()
    12·2 answers
  • Apply Decision Tree Algorithm on the following data:
    12·1 answer
  • 9. These particular machines can be decentralized.
    9·1 answer
  • Write a python program to find the volume of the pepsi present in the can which is in the shape of cylinder accepting the radius
    11·2 answers
  • Can you think of a situation that might create a problem for a website’s security? What could a back-end developer do to prevent
    6·1 answer
  • Password ____ traverse the network searching for passwords from remote authentication systems.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!