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
denis23 [38]
3 years ago
11

When executing System.out.println(a2), the toString() method in the Object class is invoked. The program cannot be compiled, bec

ause System.out.println(a1) is wrong and it should be replaced by System.out.println(a1.toString()); When executing System.out.println(a1), the toString() method in the Object class is invoked. When executing System.out.println(a1), the toString() method in the A class is invoked. True or false?
Computers and Technology
1 answer:
maxonik [38]3 years ago
5 0

Answer:

in the code snippet below, c. When System.out.println(a2) is executing, the toString() method is called.

d. When System.out.println(a1) is executing, the toString() method in class A gets called.

Explanation:

public class Test{

 public static void main(String[] args){

   Object a1 = new A();

   Object a2 = new Object();

   System.out.println(a1);

   System.out.println(a2);

 }

}

class A{

 int x;

 @Override

 public String toString(){

   return "A's x is " + x;

 }  

}

You might be interested in
Calculator and clocks are examples of -------------- in windows 7
Luden [163]
Utilities (not sure)
7 0
3 years ago
______ lets people access their stored data from a device that can access the Internet.
Lelechka [254]

Answer:

Cloud computing and applications

Explanation:

6 0
3 years ago
You are trying to access WiFi network at a coffee shop. What protocol will this type of wireless networking most likely use?
monitta
The answer to your question is a password
3 0
3 years ago
ANSWER ASAP!!! 12 POINTS!!!!! RIGHT ANSWERS ONLY
suter [353]

Answer:

B.

Explanation:

8 0
2 years ago
Read 2 more answers
What symbol is used for an assignment statement in a flowchart?
Annette [7]

Answer:

processing

Explanation:

The flow chart is a diagram that shows the activity of the program, peoples or things.

Flowchart symbol and meaning in the options:

1. Processing: it is a rectangular shape block which is used for variable declaration or assignment.

2. I/0: it is a parallelogram in shape which is used for input or output.

3. Parallelogram: it is used for input or output.

4. diamond: it is used for decisions or conditions.

Therefore, the correct option is a. Processing is the one that is used for the assignment statement.

3 0
4 years ago
Other questions:
  • What happens when the computer is thrashing? quizzlet?
    12·1 answer
  • In excel what does sidney need to consider when creating formulas
    7·1 answer
  • What is computer engineering?
    11·1 answer
  • Special programs that facilitate communication between a device and the os are called
    12·1 answer
  • The local emergency manager has the responsibility for coordinating emergency management programs and activities. A local emerge
    7·1 answer
  • Recall that through either photographic or computer technology, researchers can make a composite (or "averaged") face out of any
    11·1 answer
  • You’re browsing the internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    11·1 answer
  • Find a 95% confidence interval for the mean failure pressure for this type of roof panel.The article "Wind-Uplift Capacity of Re
    7·1 answer
  • HELP!!! Bad things about Helen Keller. I'm doing a debate and i need to prove that Steve Jobs is better than Helen Keller!!
    14·1 answer
  • The Open Systems Interconnection (OSI) is a conceptual model whose purpose is to make networks more manageable. Its objectives i
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!