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
Ivanshal [37]
2 years ago
15

How to square a number in java.

Computers and Technology
1 answer:
artcher [175]2 years ago
8 0

Answer:

num**2

Explanation:

To square a number in Java, you just take the number and use two asterisks (**) to denote an exponent, and then connect a 2 to it.

For example, if your number is 5:

5**2 in Java means 5^2, which is 25.

Just like how 5**3 in Java means 5^3.

Hope this helps.

You might be interested in
My mom hid my laptop and now I can't find it​
Svetach [21]

Answer: did you look everywhere ask for it and be like mom i wont do (whatever you did) ever again so please give me a chance can i plsss!!!!!! have it back?

Explanation:

simple as that step by step

3 0
2 years ago
2-Write test programs in java to determine the scope of a variable declared in a for statement. Specifically, the code must dete
ankoles [38]

Answer:

See Explaination

Explanation:

public class testscope

{

//start of main function

public static void main(String[] args)

{

//varible declration

int i;

int x;

//loop for 10 times

for(i=0; i<10; i++)

{

//initialize value of x to 10

x = 10;

}

//the scope of variable x is visible outside of for loop

System.out.println("The value of x is: "+x);

}

}

See attachment for sample output

nb:

You can clearly see in the output of Java program the value of x is not printed and program return errors. It means the variable x declared inside for loop does not has scope outside the for loop.

7 0
2 years ago
4. An abstract data type is defined as _____.
marusya05 [52]

Answer: object that persist set of values and operations as behavior

Explanation: Abstract data types(ADT)are those object value which are dependent upon the collection of the values and collection of the operations.The organization of the data object is not specified in ADT but the operations that are to be carried out are defined in it.

The implementation individuality displayed by the ADT and hiding of the representation or design makes it abstract.

8 0
3 years ago
you turn on your desktop computer. You can hear the fans start up, but the monitor remains blank. You wait a while, but it doesn
brilliants [131]

Answer:

Processor , Video-card  , Memory

Explanation:

If you turn on your desktop computer and the monitor remains blank, the problem might either be as a result of Processor not working, Video card bad and memory not sitting well.

if the problem is associated with processor, do the following:

  • Check if the power LED light on the motherboard is on or off.
  • If the LED light is off, check for motherboard or power supply issues.
  • If the LED light is on, check if the processor fan spins when the system is powered on.

Another major cause could be that the Video card is bad first thing to do is Update the drivers, then reseat the Videocard or probably change it.

Lastly memory module is loose, the computer might not display an image. In other words, your computer starts but the screen is black.

Now, you can try resetting the memory modules to fix the "PC turns on but no display" issue. Remove memory module from the memory slot, and then put it back into the slot to get a better connection so that the computer can recognise the memory.

8 0
3 years ago
Does the Main Content (MC) of a web page include searchboxes?
Tanzania [10]
Yes it does use search boxes
8 0
3 years ago
Read 2 more answers
Other questions:
  • The main differences between laptops and desktop computers other than size and portability.
    14·1 answer
  • Your mobile device files can be synchronized using ________. hdmi a secure digital transmission a display adapter a cloud servic
    11·1 answer
  • In Microsoft Word, how would you change the amount of space that is put in after each paragraph?
    15·1 answer
  • Help with some questions. Thank you!
    14·1 answer
  • Computers are not just stand-alone desktop machines anymore. They are often embedded in common appliances and technology that we
    6·1 answer
  • A technician with a PC is using multiple applications while connected to the Internet. How is the PC able to keep track of the d
    8·2 answers
  • What was the major sign that lead Professor Shiller to predict the crash of the housing market​
    6·1 answer
  • What type of information is kept on a database?
    10·1 answer
  • A drive is small enough to be carried in one's pocket.
    6·1 answer
  • What Microsoft feature enables you to represent text as colorful visuals
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!