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
Simora [160]
3 years ago
15

What is the output of the second println statement in the main method?

Computers and Technology
1 answer:
Doss [256]3 years ago
3 0

Answer:

B. f2.i is 1 f2.s is 2

Explanation:

In Java there are two type of variables, first is static variables and second is instance variable. static variable class variable which means you can have only one variable for all instance of that class. But instance variable will only for instance/object of that class.

For this code example, i is and instance variable, for every instance of class Foo, there will be separate i variable. but s is a static variable and that will be associated with class.

So in this program the first instance incremented the s variable and changed its value to 1 as int's default value is 0 in the constructor. So for second instance, the s value changed to 2 that's why it prints f2.s as 2 and as we know i is instance variable and every instance of foo class have there own copy of i variable so it's value will remain same for every instance.

You might be interested in
In database software, which option is the most appropriate menu choice or command to use if you want to change the format of the
sleet_krkn [62]

Answer:

I think it's d

Explanation:

             

4 0
3 years ago
Thelma is a web developer for a bowling league. She wants visitors to the website to be able to print web pages, such as league
prohojiy [21]

Answer:

"@page" is the correct answer for the above question.

Explanation:

  • "@page" is a syntax of CSS which will affect that page which is converted from the hard copy from the soft copy. It means it affects the page which will render the output.
  • So If the Thelma wants to set the margins on the output page then he can do this by the help of the "@page" tag which is defined in the CSS, and then the margin is set to this tag by the help of margin statement.
8 0
3 years ago
Complete each statement by choosing the correct answer from the drop-down menu.
mihalych1998 [28]

Answers for edg:

1- speaking and listening

2- nonverbal communication

3. gestures often have multiple interpretations

4. interpreting body language and behavior

Explanation: hope this helped! i just did them and they were right :)

7 0
3 years ago
Read 2 more answers
A run is a sequence of adjacent repeated values. Write a
Roman55 [17]

Answer: yeet

Explanation:

liker up

6 0
3 years ago
The _____________________ property controls the text appearing in the title bar on a Windows Form object.
Maslowich

Answer:

The correct answer to the given question is: "Text".

Explanation:

The windows form object is part of the vb.net.The term vb.net is divided into two parts (vb+.net). The term vb stands for visual basic and the .net stands for the network enable technology. It is a language that is not case sensitive. It is an object-oriented programming language like c++, java. It is used for making a wide range of Windows, Web, Mobile, and Office applications. which can be built on the .NET Framework. As we know that vb.net is used for making window applications. when we open windows form there is a two type of form first for the design and second for coding. In the designing page, there is text property. To use this property we display the text into the title bar.

So the correct answer is text.

4 0
3 years ago
Other questions:
  • Mrs. Golden wanted to collect baseline data on how often Lauren speaks to her neighbors during silent reading. He divided the 15
    9·1 answer
  • What would a good digital citizen do in the following situation? Nick sees that his classmate left her email account open on a s
    11·1 answer
  • IN MICROSOFT EXCEL YOU CAN UES FOMULA TO DIVIDE OR MULTIPLY WHAT IS THE CORRECT FORMULA TO CALCULATE 4*6
    14·1 answer
  • Which statement about synchronous communication is true?
    15·1 answer
  • ____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
    15·1 answer
  • A simulation model includes: a. a description of the components of the system. b. a simulation clock. c. a definition of the sta
    8·1 answer
  • An automated service that consolidates and distributes information from newsgroups, blogs, forums and news websites is called
    11·1 answer
  • Create a class named Lease with fields that hold an apartment tenant’s name, apartment number, monthly rent amount, and term of
    13·1 answer
  • When using the text command, what needs to be around the word or words you<br> want to appear?
    10·1 answer
  • Arturo is a security professional. He is strengthening the security of an information system. His design ensures that if a field
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!