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
KiRa [710]
4 years ago
12

question 4 What is the output of following program: public class Test { public static void main(String[] args) { A a = new A();

a.methodB(); } } class A { public A() { System.out.println("A's constructor is executed"); } public void methodA() { System.out.println("methodA is executed"); } public void methodAB() { System.out.println("A's methodAB is executed"); } } class B extends A { private int num = 0; public B() { super(); System.out.println("B's constructor is executed"); } public B (int n) { num = n; System.out.println("B's constructor is executed"); } public void methodB() { System.out.println("num is " + num); System.out.println("methodB is executed"); } public void methodAB() { System.out.println("B's methodAB is executed"); } }
Computers and Technology
1 answer:
beks73 [17]4 years ago
8 0

Answer:

The answer to this question can be given as:

This program will give an error message that is cannot find symbol.

a.methodB(); //error  

Explanation:

In this question, the program will give an error message that is cannot find symbol. Because in this question there are three class Test, class A, and class B. In this question first, we explain class A and class B then the class Test. In class A we create constructor then we create two methods that is methodA() and methodAB(). In the constructor and methods, we print  the message.  In class B class inherits class A. In this class we declare an integer variable that is used as a parameter in the parameterized constructor. but first, we declare the default constructor then parameterized constructor. In the default constructor, we use the super keyword. Super keyword is  used to call the above class method or constructors. Then we declare the two methods that are methodB() and methodAB ()  in these methods we print messages.  Then we define the main class that is the class Test. In this class, we define the main method and create class A object and call the class B method. that is not possible in java.

You might be interested in
Which header provides functions that deal with exceptional conditions?
Lyrx [107]

Answer:

<exception> header provides functions for exception handling in c++.

Explanation:

Exceptions gives a way to respond to exceptional conditions (like runtime errors) in codes by transferring the control to other special functions called handlers. Since try,catch and throw can work in the iostream header file.To use more functions like unexpected,current_exception,rethrow_exception we need exception header file.

3 0
4 years ago
What mechanism can organizations use to prevent accidental changes by authorized users?.
AlladinOne [14]

The process of monitoring and managing changes to software code is known as version control, commonly referred to as source control.  Version control ensures that two users cannot update the same object.

<h3>What is meant by Version control?</h3>

A series of software engineering tools called version control regulates how changes are made to texts, sizable websites, computer programmes, and other collections of information. Version control is a component of software configuration management.

Version control, often known as source control, is the process of keeping track of and controlling changes to software code. Version control systems are computer programmes that help software development teams keep track of changes to source code over time.

Version control improves teamwork and communication while assisting software development teams in keeping track of code changes. Version control enables straightforward, ongoing programme development.

To learn more about version control refer to:

brainly.com/question/26533170

#SPJ4

4 0
2 years ago
Your Windows PC has an AMD processor installed that includes AMD-V technology and the motherboard fully supports this processor.
Anvisha [2.4K]

Answer:

Option C: Windows Virtual PC is the correct answer.

Explanation:

The virtualization program for Microsoft Windows is given by Windows Virtual PC. As discussed it has an AMD processor installed that includes AMD-V technology and the motherboard fully supports this processor.

The superseded version of Windows virtual PC is Hyper-V.  It is the most capable version of Microsoft hypervisor you can install on this machine, provided the computer meets all the other requirements.

All other options are wrong as the virtualbox is not considered as the Microsoft hypervisor therefore can't be installed. Similarily, the hypervisor named as Windows XP mode is not so capable that it could meet all requirements. In the end, the Parallel Desktops can not be run on the machines as they dont come under the Microsoft hypervisor category.

I hope it will help you!

7 0
3 years ago
Why is the statement if x=y not working in python
Veronika [31]

Answer:

x=1

Explanation:

Re-run your installer (e.g. in Downloads, python-3.8. 4.exe) and Select "Modify". Check all the optional features you want (likely no changes), then click [Next]. Check [x] "Add Python to environment variables", and [Install]

8 0
2 years ago
¿Qué podría pasar si los avances tecnológicos cayeran en personas sin formación Ética-Moral?
timurjin [86]

Answer:

If technological advances fall on people without Ethical-Moral training, then life itself would be threatened as our humanity and environment would be destroyed.

Explanation:

Question:

What could happen if technological advances fell on people without Ethical-Moral training?

Morals: Morals refer to human behavior. The principles of right and wrong

Ethics: It is the body of rules and regulations that dictate the conduct of practitioners of a particular profession.

In terms of technology, ethics is viewed in two contexts; if the pace of technological innovation is benefiting the humanity or not; if it is severely empowering people while choking others in the process.

Technology: it is the application of scientific principles for practical purposes of human life. Technology when used properly improves the quality of life of people.

On one hand, technology in itself is said to be neither good nor bad. It is people who determine it's application. With this said, we can infer that if technology falls on the wrong hands, it could be disastrous.

On the other, some technologies like nuclear fission, genetic engineering exert enormous power that their existence raises ethical or moral questions.

The role of ethical training in technological advancement would be to monitor rather than control to ensure fair practices.

Now if technological advances fell on people without ethical-moral training, then life itself would be threatened:

- Cultural breakdown: Almost everything in our day to day lives would depend on technology

- Loss of jobs: this would happen when machines do the work of men

- Inequalities as those with initial access to it would be the rich thereby widening the gap between the rich and poor.

- Exploitation as competition towards Mastery and control increases

- Environmental degradation

5 0
3 years ago
Other questions:
  • PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
    7·1 answer
  • A(n) combines video instruction and interaction with an instructor and students in an online classroom.
    9·1 answer
  • Bullet points on a slide should be limited to _____. 2 4 8 10
    15·2 answers
  • Fractures in Earth’s crust where displacement has occurred are called
    13·1 answer
  • How do humans acquire voltage in their bodies
    8·1 answer
  • Let’s say you’re publishing a message with the Hootsuite Composer. The message contains a link to a landing page, and you want t
    9·1 answer
  • Marissa, a 21-year-old young woman, is working as an intern at a software company. She has recently graduated from college. She
    6·1 answer
  • Climax Medical Technology, a fast-growing global research firm, has accumulated so much client information that conventional dat
    15·1 answer
  • Fill in the boxes to show two ways you can find 8+6​
    8·1 answer
  • 4. //Program prompts users for names and quantities for a $2.00 product and displays total for each user until “XXX” is entered
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!