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

Consider the classes below, declared in the same file: class A { int a; public A() { ​ a = 7; } } class B extends A { int b; pub

lic B() { ​ b = 8; } } Which of the statements below is false? Group of answer choices After the constructor for class B executes, the variable a will have the value 7. A reference of type A can be treated as a reference of type B. Both variables a and b are instance variables. After the constructor for class B executes, the variable b will have the value 8.
Computers and Technology
1 answer:
DiKsa [7]3 years ago
4 0

Answer:

2. <em>A reference of type A can be treated as a reference of type B</em> - False

Base class or its objects are not related to their derived class (or its objects).

Explanation:

class A {

   int a;

   public A() {

       a = 7;

   }

}

class B extends A {

   int b;

   public B() {

       b = 8;

   }

}

///////////////////////////////////////////////////////////////////////////////////////////////////////

1. <em>After the constructor for class B executes, the variable a will have the value 7 </em>- True.

When an object of a derived class is declared, the constructor of base class is called before the constructor of derived class (is called).

3. <em>Both variables a and b are instance variables </em>- True.

Classes can have instance, or member, variables and methods.

4.<em> After the constructor for class B executes, the variable b will have the value 8</em> - True.

When object of class B is declared, its constructor was called, which initialized variable b to 8.

You might be interested in
Which of the following statements is true?
diamong [38]
The correct answer is d
8 0
3 years ago
The file descriptor stderr is represented by the number ____.
enyata [817]
Stderr is 2. stdin is 0, stdout is 1.
5 0
3 years ago
Enlist the various data analysis methods for study of Infrasonic waves, Seismic waves, Earthquake prone areas and how AI can be
snow_tiger [21]

Answer:

Throughout the clarification segment below, the essence including its query is mentioned.

Explanation:

  • The analytical techniques utilize magnetic fields that allow the waves to be analyzed.
  • They sometimes use echolocation strategies.
  • It is possible to be using artificial intelligence to research potential forecasts. Climate, improvements throughout the climate as well as other things.
  • Like toxic waves, this will be capable of predicting tides.
5 0
2 years ago
Jimmy has been issued a citation for littering in a city park. When Jimmy
mixas84 [53]

Answer:

this violates with the

constitution

Explanation:

5 0
3 years ago
Holi alguien sabe como cambiar el gamertag en XBox App (para iOS)?
Schach [20]

Answer:

Hola, cambiar tu gamertag (el nombre o apodo que te identifica en los juegos de XBox en línea) es muy sencillo. Simplemente debes ingresar al menú principal de tu aplicación XBox App, y una vez allí seleccionar la imagen que te identifica como usuario. Al clickear allí, podrás seleccionar la opción Personalizar, donde se desplegará un menú de opciones dentro de las cuales se encontrará la de cambiar tu gamertag o nombre de usuario. Recuerda que solo podrás cambiar tu gamertag en forma gratuita una única vez.

3 0
2 years ago
Other questions:
  • The purpose of a capacitor unit in a vacuum cleaner is to
    12·1 answer
  • On Gmail, can I have an email get sent to someone at a certain time?
    7·1 answer
  • You manage an NLB cluster composed of three servers: Server1, Server2 and Server3. Your maintenance schedule indicates that Serv
    15·1 answer
  • For a line segment, show that clipping against the top of the clipping rectangle can be done independently of the clipping again
    7·1 answer
  • ServletConfig defines a set of methods that a servlet uses tocommunicate with its servlet container.
    5·1 answer
  • The famous study entitled ""Protection Analysis: Final Report"" focused on a project undertaken by ARPA to understand and detect
    14·1 answer
  • Project manager George is defining project management to his team. How should he define project management in one sentence?
    7·1 answer
  • Which of these is an expansion slot type?
    5·1 answer
  • What happens when text is added to grouped objects that is larger than an object ?
    9·2 answers
  • balance exercises used for introducing balance training should initially involve little joint motion and improve what type of co
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!