⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fibonacciconstants.java

📁 随书的代码
💻 JAVA
字号:
import java.math.BigInteger;public class FibonacciConstants {  public final static String rootElementName    = "Fibonacci_Numbers";  public final static String fibonacciElementName = "fibonacci";  public final static String xmlDeclaration    = "<?xml version=\"1.0\"?>";  public static void main(String[] args) {         BigInteger low  = BigInteger.ONE;      BigInteger high = BigInteger.ONE;                  System.out.println(xmlDeclaration);        System.out.println("<" + rootElementName + ">");        for (int i = 0; i < 10; i++) {        System.out.print("  <" + fibonacciElementName +">");        System.out.print(low);        System.out.println("</" + fibonacciElementName +">");        BigInteger temp = high;        high = high.add(low);        low = temp;      }      System.out.println("</" + rootElementName + ">");    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -