Is there a character within the Math API that allows for representing the character π
?
If you want to write this to a file you can achieve it through Unicodes, below is an example of how,
import java.io.*;
public class Test {
public static void main(String[] args) throws Exception{
BufferedWriter out =
new BufferedWriter(new OutputStreamWriter(
new FileOutputStream("out.txt"),"UTF8"));
out.write("alpha = \u03B1, beta = \u03B2 ,pi = \u03C0");
out.flush();
out.close();
}
}
out put : alpha = α, beta = β ,pi = π