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

a. Show the output of the following program: 1: public class Test { 2: public static void main ( String [] args ) { 3: A a = new

A( 3 ); 4: } 5: } 6: 7: class A extends B { 8: public A ( int t ) { 9: System.out.println( "A's constructor is invoked" ); 10: } 11: } 12: 13: class B { 14: public B () { 15: System.out.println( "B's constructor is invoked" ); 16: } 17: } b. Is the no-arg constructor of Object invoked when new A(3) is invoked? 6. Indicate true or false for the follow statements: a. You can always successfully cast an instance of a subclass to a superclass. b. You can always successfully cast an instance of a superclass to a subclass. 7. What's wrong with the following code? 1: public class Test { 2: public static void main ( String [] args ) { 3: Object fruit = new Fruit(); 4: Object apple = (Apple) fruit; 5: } 6: } 7: 8: class Apple extends Fruit { 9: } 10: 11: class Fruit { 12: } 8. When overriding the equals method, a common mistake is mistyping its signature in the subclass. For example, the equals method is incorrectly written as equals (Circle circle) as shown in (a) below. It should be written as equals(Object circle), as shown in (b) below. Show the output of running class Test using the Circle class first from (a), and then from (b). Explain the output. 1: public class Test { 2: public static void main ( String [] args ) { 3: Object circle1 = new Circle(); 4: Object circle2 = new Circle(); 5: System.out.println( circle1.equals( circle2 ) );
Computers and Technology
1 answer:
faust18 [17]3 years ago
3 0

Answer:

See attached file.

Explanation:

See attached file.

Download txt
You might be interested in
What is the purpose of the Format Painter?
Oduvanchick [21]

Answer:

changes the formatting to be exact from what is copied to what should be

Explanation:

It happens to be the feature of the MS word that is applied to a style from one section of the document to another section. We first highlight the text with the thought of style like size, font, etc., and then click the format painter. The text that is highlighted next, gets transformed into the thought of style. And hence, the above option is correct.

5 0
3 years ago
In a virtual memory system, each process must have its own page table.(True or False?)
Anna71 [15]

Answer: True

Explanation:

 Virtual memory is the secondary storage memory and this type of memory are addressed as main part of the memory.

When the virtual memory copying in the physical memory then, at that time the operating system divide the memory into the file page with the address and definite size number. Then, the each page are store in a disk.

When this page are required then, the operating system copy from disk to main memory and then, the virtual address are converted into the  real address.

6 0
3 years ago
The internet and the World Wide Web were results of years of research by Pioneers such as Ray Tomlinson, Vincent Cerf, Vannevar
iren [92.7K]

Answer:

The Internet began as a US Department of Defense network named Advanced Research Project Agency Network (ARPANET) funded by the Advanced Research Project Agency (ARPA, later DARPA). In the 1970s, universities and other educational institutions began sharing this technology. The network grew as more and more users began sharing information.However, the information being shared on this network was very limited because of its government ties. The ARPANET was decommissioned in 1990. This move was followed by the commercialization of the Internet, which allowed it to carry business and personal traffic.

Explanation:

8 0
3 years ago
The process of transduction is analogous to a. a rocket ship breaking through the Earth’s atmosphere. b. a sailboat utilizing th
maks197457 [2]

Answer:

The answer to this question is "none of these"

Explanation:

Transduction is also known as a virus, that moves in the genetic information through each type of bacteria to another, and in the computer science it is used in the machine learning, that provides testing, and other options were wrong, that can be explained as follows:

  • Option a, It can't use in a rocket ship for breaking.
  • Option b, It can't utilize glide along the water.  
  • Option c, It provides hack and test systems, and not for communication.
  • Option d, It uses a programming language to test virus, that's why it is wrong.
6 0
3 years ago
Send a newsletter when you want to communicate directions, advice, or information.
lilavasa [31]
True, since you do want to give out information
4 0
3 years ago
Read 2 more answers
Other questions:
  • A(n) _____ is the highest educational degree available at a community college. master bachelor associate specialist
    13·2 answers
  • The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
    12·1 answer
  • Is there such a thing as an ethical reason for unauthorized access into a computer system?
    15·1 answer
  • ¿ cuales son las características de revolución industrial?
    11·1 answer
  • Identify a true statement about heuristics: a. They are more complicated than algorithms. b. Unlike algorithms, they do not perm
    15·1 answer
  • Define input hardware​
    12·1 answer
  • By limiting the number of times a person can use a type of software before registering as the authorized owner of that software,
    15·1 answer
  • When you are typing data that is in a series, such as days of the week or months of the year, you can use this tool to complete
    11·1 answer
  • What is the complete path and filename of the file where ports and their associated protocols are defined
    12·1 answer
  • Write code that declares a variable named minutes, which holds minutes worked on a job,
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!