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
Complete each sentence using the drop-down menu. Information on local driving laws can be found on a website. A class textbook c
zheka24 [161]

Answers:

1. D

2. A

3. B

4. C

Explanation: I just did it and got a 100%

7 0
3 years ago
Read 2 more answers
Any idea how to make my simple python projects such as guess the number, mad libs, etc. even better?
-Dominant- [34]

Answer: Person's name.

Explanation:

3 0
1 year ago
Read 2 more answers
Brook is designing a database that customers can use to find their ideal vacation spot. If they only want to see beach vacations
Aleksandr [31]

Answer:

filter the data

Explanation:

its like when you filter a search on y o u t u b e and say u search among us u can filter and say live vids or channel's

7 0
2 years ago
Read 2 more answers
During which step of the problem-solving process would group members combine and elaborate on ideas? Define the problem. Analyze
slava [35]

In a problem-solving process occurring inside a group, (C) develop creative solutions would be where the members combine and elaborate on ideas.

Brainstorming would be a prominent feature during this process since group members would be encouraged to state her or his opinion and solutions about the problem that the group needs to solve.

5 0
3 years ago
Which term describes the process of training a machine to do simple, repetitive tasks, and adapt or correct its performance base
yKpoI14uk [10]
Automation. ... It involves taking a machine or software that was taught to do simple repetitive tasks (traditional automation) and teaching it to intuitively adapt or correct its performance based on changing conditions, at speed and scale.
8 0
2 years ago
Other questions:
  • Holly Carpenter argues that technology may actually prevent some kinds of evolution that would benefit humans. Do you agree with
    8·2 answers
  • What is the 7 X 7 when referring to PowerPoint presentations?
    12·2 answers
  • Playstation network live updates pes 2018 does it cost extra
    13·1 answer
  • The ____ algorithm was the first public key encryption algorithm developed (in 1977 and published for commercial use.
    8·1 answer
  • The company where Derek works has tasked him with setting up and securing a SOHO router. He wants to make sure the wireless netw
    7·1 answer
  • Imagine that you have a friend who has expressed interest in designing and programming video games. He loves to play video games
    10·1 answer
  • Which command do you use to save a document with a new name? Choose the answer.
    10·2 answers
  • Hello everyone! can anybody help me? i need help with computing.
    10·1 answer
  • How does the sky change as onegets above Earth’s atmosphere?
    5·1 answer
  • How many pages is 1500 words double spaced 12 font?.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!