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
xz_007 [3.2K]
2 years ago
10

Write a java program as follows Write a method called powOfTwo that takes an integer as parameter, computes, and outputs it’s sq

uare
Computers and Technology
1 answer:
Kisachek [45]2 years ago
8 0

Answer:

public static int powOfTwo(int input) {

 return input*input;

}

You will have to call this method in main
for printing it, write

System.out.println(powOfTwo(your number));

in public static void main(str[]args) {

}

You might be interested in
Which of the following is true? Group of answer choices worst case time of Heapsort is better than worst cast time of Quicksort
Sav [38]

Answer:

Worst case time of Heapsort is better than worst case time of Quicksort.

Explanation:

Worstcase of Heapsort is nlog(n). Worstcase time of Quicksort is (n^2). Heapsort is comparison based sorting algorithm. Heapsort divides input into sorting. It is a selection sort in which we send maximum inputs for maximum elements at end. Quicksort is divide and conquer algorithm. It is considered as efficient sourcing algorithm.

8 0
3 years ago
Is it safe to turn on a computer without ram?
swat32
Well, it is safe to turn a computer on without a RAM, but you can't really do it. RAM is one of the essential components in computers without which you can't really use a computer. You can turn it on, however, nothing will appear on your screen and the system won't boot. So, technically, it is safe, but it won't do anything to your computer as it cannot run without RAM.
4 0
3 years ago
Read 2 more answers
Differentiate between Scope and Linkage
Lera25 [3.4K]

Answer: The difference between the scope and linkage is as follows:-

  • Scope of the variable is defined as the variable view from different program parts whereas the linkage is described as the link that is made between the variable and the declaration function having the common name.
  • Scope of variable describes about the existing time of the variable in the program whereas linkage is defined for the name of variable present in the program is available at all time .

6 0
3 years ago
your browsing the internet and realize your browser is not responding. which of the following will allow you to immediately exit
Mandarinka [93]

Answer:

Task Manager is the answer

8 0
4 years ago
Suppose a local area network requires eight characters for a password. The first character must be a letter, but the remaining s
Elis [28]

Answer: 2037468266496

Explanation:

The question says first character must be a letter = A - Z ( 26 characters )

Others can either be letters or digits = digits with range 0-9 ( 10 digits )

From the second to the seventh character can either be digits or letter hence we have ( 10 +26 ) = 36 chances

Considering rule of product

Number of chances/outcomes of the password = ( 26×36⁷)

The power of 7 was as a result of remaining seven characters can be either a letter or digits.

5 0
3 years ago
Other questions:
  • What does the Autosum feature on excel do?
    15·1 answer
  • Which code returns the date in the format friday, april 20th, 2015?
    13·1 answer
  • Write a program that reads in the length and the width of a rectangular yard.
    5·1 answer
  • Who can help me with 50 varables on codeskulptor​
    8·1 answer
  • Which type of interview is conducted in a format where the interviewee is questioned and presented to a panel of individuals?
    7·2 answers
  • Which type of development metrics does Instagram most improve when it releases an update in the App Store to fix errors its cust
    15·1 answer
  • Give an example of a language L such that |L|=5 and |L^2|=16.
    5·1 answer
  • The Mail Merge option is located in which tab? a;home b;insert c;refernces d;mailings
    11·2 answers
  • You want to divide the value in cell D3 by the value in cell E3. Which formula should you use?
    11·2 answers
  • While (e &lt; 10):<br> print (c)
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!