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
Llana [10]
2 years ago
14

Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. What will be the ou

tput of the following code?
class Vehicle public static int counter = 0;
public int printCounter_val ) counter = counter + 1;
return counteri public class test
Vehicle public static void main(String args[l) f Vehicle v1=new vehicle();
v1.printCounter val Vehicle v2=new Vehicle() ;
system.out.printin (v2.printCounter_val )):
The output will be______
Computers and Technology
1 answer:
lord [1]2 years ago
8 0

Answer:

2

Explanation:

The output of the Java program is 2. The public Vehicle class is defined with the class variable 'counter'. When a Vehicle class object is instantiated, the counter variable increments by one.

In the program, the two instances of the class are created, incrementing the counter variable to two, the print statement outputs 2 as the result of the program.

You might be interested in
What is the recommended secure protocol for voice and video applications? secure real-time transport protocol (srtp) hypertext t
snow_tiger [21]
The recommended secure protocol for voice and video applications is the Secure<span> Real-time Transport </span>Protocol<span> (SRTP) protocol. SRTP is a Real-time Transport </span>Protocol (RTP) profile used to  to provide encryption, message authentication and integrity.
The default cipher of SRTP is the Advanced Encryption Standard<span> (AES) .</span>
8 0
3 years ago
PLEASE PLEASE PLEASE PLEASE HELP ASAP!!!!! I PROMISE I WILL GIVE YOU A BRAINLIEST FOR THE CORRECT ANSWER PLEASE HELP!!
inysia [295]
The answer will be C

As she is about to leave the position, in account of professionalism, she should NOT do any unnecessary harm to the current company, and  she should notify the company for necessary description before leaving. 
5 0
2 years ago
Read 2 more answers
Write a program in python to test if given number is prime or not.
Paraphin [41]

Answer:

Answer:

def main():

num = int(input("Input a number to check for prime: "))

if num > 1:

 for i in range(2,num):

  if (num % i) == 0:

   print("%d is not a prime number" % num)

   break

  else:

   print("%d is a prime number" % num)

   break

else:

 print("%d is not a prime number" % num)

 

if __name__ == "__main__":

main()

Explanation:

Solution retrieved from programiz.com.

Note, this program uses the idea of the Sieve of Eratosthenes to validate the input number by using the modulo operator to determine primeness.

The program will output to the user if the number input is indeed prime or not.

Cheers.

Explanation:

4 0
2 years ago
Read 2 more answers
What is the first thing you should do to find a mean and range of data?
KatRina [158]

Answer

To find mean of data add all the numbers in the set of data and divide the sum by the number of addends.

To find range, identify the difference between the highest value and lowest value in the set of data.

Explanation

Mean, mode, median and range are the primary measurements used to get the measures of central tendencies. To get the mean and range; first arrange the data in an ascending order, then identify the highest value and the lowest value in the set. The difference between these two data values gives the range of the set of values. For the mean, add all the set of values and then divide their sum with the number of values in the set of data.


6 0
3 years ago
Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l
alexandr1967 [171]

Answer:

a=input("Amount in pennies")

b=int(a)

dollars=0

dimes= 0

quarters=0

nickels=0

pennies = 0

dollars = int(b/100)

b= b- dollars *100

quarters=int(b/25)

b=b-quarters*25

dimes = int(b/10)

b = b -dimes*10

nickels=int(b/5)

b=b - nickels * 5

pennies = b

print(dollars)

print(dimes)

print(nickels)

print(pennies)

Explanation:

The required program is in answer section. Note, the amount is entered in pennies.

7 0
3 years ago
Other questions:
  • When a cache block has been modified since being read from main memory?
    10·2 answers
  • E-fit and similar software compares what?
    7·1 answer
  • Mobile apps known as news _________ collect articles from a variety of sources and present them to you in a magazine-style forma
    7·2 answers
  • Mobile devices need to work within limited screen space ? true or false
    9·2 answers
  • which three objects can be linked or embedded in a word document? A. worksheets, margins, colors B. charts, worksheets, images C
    7·1 answer
  • Security controls are measures taken to protect systems from attacks on the integrity, confidentiality, and availability of the
    12·1 answer
  • Persuasion is when Someone speaks to crowd about love <br>○True<br>○False​
    10·1 answer
  • You’re having trouble connecting to the Internet so you call your Internet service provider for help. They need to know the perm
    15·1 answer
  • My pc suddenly freezes and i can't open any apps or task manager. Apps do not open at all and if i restart from the start it get
    9·1 answer
  • Why is it important to put the most specific case first? What types of errors does it help avoid?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!