Java Number Power powerString(int power)

Here you can find the source of powerString(int power)

Description

power String

License

Open Source License

Declaration

static String powerString(int power) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    static String powerString(int power) {
        if (power == 1) {
            return "";
        }//from   w w w . ja v a 2s .c o m
        if (power < 0) {
            return "^(" + power + ")";
        }
        return "^" + power;
    }
}

Related

  1. powerOfTen(int exp)
  2. powerOfTwo(final int i)
  3. powerOfTwo(int current, int desired)
  4. PowerOutageDistr()
  5. powerString(int power)
  6. powerToInteger(String pow)
  7. powerTrim(String s)
  8. powerType(float power)
  9. powerX(long a, long b)