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
sineoko [7]
4 years ago
15

What is the output of the second println statement in the main method, public class foo { int i ; static int s ; public sttic vo

id main (string[] args) { foo f1 = new foo() ; system.out.println("f1, i is " + f1.i + f1.s is " + foo f2 = new foo () ; system.out.println (" f2.i is " + f2.i + f2.s is " + foo f3 = new foo () ;a) f2.i is 1 f2.s is 1.b) f2.i is 1 f2.s is 2.c) f2.i is 2 f2.s is 2.d) f2.i is 2 f2.s is 1.e) f2.i is 0 f2.s is 1.
Computers and Technology
1 answer:
Sedaia [141]4 years ago
6 0

Answer:

b) f2.i is 1 f2.s is 2

Explanation:

i is an instance variable and s is static, shared by all objects of the Foo class.

You might be interested in
Flammable and combustible materials should be stored according to: A. Their color B. Their fire characteristics C. Their size
iris [78.8K]

B. their fire characteristics

this should be fairly obvious

6 0
3 years ago
Read 2 more answers
In what way are high-level programming languages limited? (5 points)
Nat2105 [25]

Answer: High-level computer languages must be translated into assembly or machine languages by a compiler before they can be executed, making them slightly slower to execute than raw assembly or machine language. The answer is D.

4 0
3 years ago
Read 2 more answers
Write a program that asks the user to enter a positive integer that represents a number in the decimal system and then displays
Maru [420]

Answer:

In Python:

def decimalToBinary(num):

   if num == 0:

       return 0

   else:

       return(num%2 + 10*decimalToBinary(int(num//2)))

       

decimal_number = int(input("Decimal Number: "))

print("Decimal: "+str(decimalToBinary(decimal_number)))

Explanation:

This defines the function

def decimalToBinary(num):

If num is 0, this returns 0

<em>    if num == 0: </em>

<em>        return 0 </em>

If otherwise

   else:

num is divided by 2, the remainder is saved and the result is recursively passed to the function; this is done until the binary representation is gotten

       return(num%2 + 10*decimalToBinary(int(num//2)))

       

The main begins here.

This prompts the user for decimal number

decimal_number = int(input("Decimal Number: "))

This calls the function and prints the binary representation

print("Decimal: "+str(decimalToBinary(decimal_number)))

3 0
3 years ago
Difference between vacuum tube and transistor​
Lorico [155]

Answer:

I HOPE THE ABOVE INFORMATION WILL HELP YOU A LOT.

6 0
3 years ago
List and the deference between MS access objects​
Dafna11 [192]

Answer:

MS access objects help the user list , information and designed reports .

Explanation:

MS access objects are create a forms, data base, tables,queries, and modules. There are many objects are following:-Tables, Forms,Reports, Queries.

Table:- These are objects used into a define and store the data,tables are contain the columns and the store of different data.

Form:- Form is the object that designed by the data input and control application queries or tables, forms are used in viewing records.

Reports:- Reports are the designed to the printing and calculating data,reports are used because data in read to easy format.

Queries:- Queries are provides that data from one or more table,you can define the update ,delete, insert, select data.

4 0
4 years ago
Other questions:
  • Add the number <br><br> 10010110+10111101
    12·2 answers
  • List three reasons you might use hwinfo when troubleshooting and upgrading a computer
    10·1 answer
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
  • Words like "free" or "percent off" will not only trigger spam filters for your email, but will also ___________
    8·1 answer
  • URGENT!!Motors and gears play an important role in the motion of robots. Discuss the different types of motors used in robotics.
    9·1 answer
  • If you are logged on to Windows Live Messenger, why would you be unable to engage
    14·1 answer
  • What is the determining criterion for removing older transactions from a company file
    9·1 answer
  • If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsA
    7·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    7·1 answer
  • (PLEASE HELP!! I'll award brainiest!!)
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!