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

Which of the following is used to allocate memory for the instance variables of an object of a class?1. the reserved word public

Computers and Technology
1 answer:
kodGreya [7K]3 years ago
3 0

Answer:

The correct answer to the following question will be 2. the operator new.

Explanation:

New operator is used to allocating the memory to the instance object.The new object can be created by using a "new" keyword in java .

Syntax of using 'new' operator is :

class_name object_name=new class_name() // it allocated the memory to the class

For Example :

ABC obj = new ABC;  

Now, this time obj points to the object of the ABC class.

obj = new ABC ();

call the construction of ABC class

You might be interested in
If a user’s current directory is /home/mary/project1, which command could she use to move to the etc directory directly under th
kykrilka [37]

Answer:

Option 4 is the correct answer to the above question.

Explanation:

In the Linux operating system, The etc folder is listed on the root directory. When any user wants to go in the root directory of the Linux operating system from anywhere, then he needs to follow the command of the name of the folder where he wants to go with the '/' symbols. The above question states that the user wants to go to the etc folder of the root directory, then he needs to press the command '/etc' with the help of cd command because cd command is used to open any folder. So the option 4 is the correct, while the other is not because--

  • Option 1 states about cd which gives the error.
  • Option 2 states about cd /home/mary/etc which take the user to the etc folder which is in the mary folder.
  • Option 3 states about the cd etc which is used to take the user on the etc folder which is in the current folder.
  • Option 5 states about the cd\etc which gives the error.
8 0
3 years ago
Write MVCTester.java. When the program starts, the initial screen displays a button labeled "add", a blank text area, and a text
Debora [2.8K]

Answer:

Kindly note that, you're to replace "at" with shift 2 as the brainly text editor can't take the symbol

Explanation:

import java.awt.event.*;  

import java.awt.geom.Area;

import javax.swing.*;

class MVCTester implements ActionListener{

JButton b; //button

JTextField t1; //textfiled

JTextArea area; //text area

MVCTester(){

JFrame f=new JFrame("Button Example");

//button

b=new JButton("add");  

b.setBounds(0,0,125,27);  

f.add(b);  

b.addActionListener(this);  

//textfiled

t1=new JTextField();  

t1.setBounds(0,161,125,24);  

f.add(t1);

//textarea

area=new JTextArea();  

area.setBounds(0,28,123,130);  

f.add(area);

area.setColumns (17);

area.setLineWrap (true);

area.setWrapStyleWord (false);

f.setSize(125,225);

f.setLayout(null);  

f.setVisible(true);

}

"at"Override

public void actionPerformed(ActionEvent arg0) {

Control c=new Control(area,t1,b);

}  

}  

class Control {

Control(JTextArea area,JTextField t1,JButton b){

//simple logic getting text of text area adding text of textfiled and setting the text to text area

area.setText(area.getText()+t1.getText()+"\n");

t1.setText("");

}

}

public class Modal{

public static void main(String[] args) {  

MVCTester be=new MVCTester();

}

}

8 0
3 years ago
Read 2 more answers
9. Which Incident Type is limited to one operational period, does not require a written Incident Action Plan, involves Command a
SIZIF [17.4K]

Answer:

B. Type 4

Explanation:

Type 4 incident type does not require a written IAP but documented operational briefing will be completed for all incoming resources. Also, several resources are required to mitigate the incident, including a task force or strike team. If needed, the command and general staff functions are activated. The incident is usually limited to one operational period in the control phase and the agency administrator may have briefings, and ensure the complexity analysis and delegation of authority is updated.

8 0
3 years ago
Read 2 more answers
Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the res
marysya [2.9K]

Answer:

Data Type: Double (decimal)

Variable Name: avg

Explanation:

An average of numbers will typically give you a decimal answer. Therefore, you should use the Double data type.

8 0
3 years ago
Read 2 more answers
The iteration variable begins counting with which number?<br> O 0<br> O 1<br> O 10<br> O 0 or 1
bonufazy [111]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The iteration variable begins counting with 0 or 1.

As you know the iteration mostly done in the looping. For example, for loop and foreach loop and while loop, etc.

It depends upon you that from where you can begin the counting. You can begin counting either from zero or from one.

For example: this program counts 0 to 9.

<em>int total=0;</em>

<em>for(int i=0; i>10;i++)</em>

<em>{</em>

<em>total = total+i;</em>

<em>}</em>

Let's suppose, if you want to begin counting from 1, then the loop should look like below:

<em>int total=0;</em>

<em>for(int i=1; i>10;i++)</em>

<em>{</em>

<em>total = total+i;</em>

<em>}</em>

7 0
3 years ago
Other questions:
  • Which of the following software is cloud-based? OpenOffice Writer Word 2013 Word Online Word Perfect\
    13·2 answers
  • Which best describes a computer bug? A piece of computer hardware that is out of date or has a newer version a piece of computer
    14·2 answers
  • The opening of the throttle plate can be delayed as long as
    13·1 answer
  • During an experiment, if you purpose change the temperature to test a hypothesis the temperature is called what??
    6·1 answer
  • Interpretation is adding meaning to information by making connections and comparisons and by exploring causes and consequences.
    11·1 answer
  • What is the name of the technology that is typically implemented on switches to avoid Ethernet connectivity problems when the wr
    11·1 answer
  • How do i beat the final battle in lara croft: temple of osiris?
    9·1 answer
  • HELP I WILL MARK BRAINLIEST!!! I NEED ASAP!!!
    5·1 answer
  • PLZ ANSWER ALL MY QUESTION. Which line of code will display the variable num rounded to the nearest tenth?
    14·1 answer
  • What happens when there is a data fail?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!