How to get the powerof N without using a Math class in java?

Answer Use a for loop. For example the following function returns the answer as an integer:private int printPowersOfN(int main, int power){int answer = main;for(int i = 1;i < power;i++){answer = answer * ... Read More »

Top Q&A For: How to get the powerof N without using a Math c...

How to Name a Class in Java?

This article is about choosing proper names of Java classes you write. Theoretically you can call the class by any name that is supported by the language itself. However it is better to follow some... Read More »

How to Pass a Math Course When You Have Not Had a Math Class in 30 Years?

Congratulations on your decision to return to school to further your education. You may be scared that you may not be as good at math as you used to be, but with the right help and the right direct... Read More »

(java) Using class names instead of int or String?

The thing between the "private" and the name of the variable is the variable's data type. It can be a primitive type like int, or it can be the name of a class. (String is the name of a class too.)... Read More »

ToString error in my please help?

Delete "Rect Surface Area" and "Rect Peremeter" in String.format().