Java: How can I make this calculus method on limits more efficient?

how can I initialize all of my variables more easier?

is there a calculus package?

is there a more efficient solution overall?

import java.util.Scanner;

public class limits {

public static void main(String[] args)
{
    String introMessage = "          ***Calculus: Limits***"                 + "\n"
            +             "This application uses the method of exhaustion"   + "\n"
            +             "to test limits. You enter the number that x"      + "\n"
            +             "approches and this program will give you three"   + "\n"
            +             "numbers on either side of the limit showing"      + "\n"
            +             "closer approximations of the limit.";
    System.out.println(introMessage);
    System.out.println();
    String polynomialMessage = "Our function: "                 + "\n"
                            +  "  lim   f(x) = x^2 + x + 1 = L" + "\n"
                            +  "x -> a";
    System.out.println(polynomialMessage);
    System.out.println();
    System.out.println("As x approaches a, what will our limit L be?");
    System.out.println();

can I initialize all of these at once?

    // initialize variables
    double belowAOne = 0.0;
    double belowATwo = 0.0;
    double belowAThree = 0.0;
    double belowAFour = 0.0;
    double aboveAOne = 0.0;
    double aboveATwo = 0.0;
    double aboveAThree = 0.0;
    double aboveAFour = 0.0;

    double totalBAOne = 0.0;
    double totalBATwo = 0.0;
    double totalBAThree = 0.0;
    double totalBAFour = 0.0;
    double totalAAOne = 0.0;
    double totalAATwo = 0.0;
    double totalAAThree = 0.0;
    double totalAAFour = 0.0;

    double L = 0;

    // create a Scanner object named sc
    Scanner sc = new Scanner(System.in);

    // perform invoice calculations until choice isn't equal to "y" or "Y"
    String choice = "y";
    while (!choice.equalsIgnoreCase("n"))
    {
      System.out.println("Please enter a whole number between 1 and 10 for a: ");
      double a = sc.nextDouble();

      if (a > 0 && a <=10 )
      {
      // calculate L
      L = (a*a) + a + 1;

      // create values that approaches a
      belowAOne = a - .5;
      belowATwo = a - .1;
      belowAThree = a - .01;
      belowAFour = a - .001;
      aboveAOne = a + .5;
      aboveATwo = a + .1;
      aboveAThree = a + .01;
      aboveAFour = a + .001;

      totalBAOne = (belowAOne * belowAOne) + belowAOne + 1;
      totalBATwo = (belowATwo * belowATwo) + belowATwo + 1;
      totalBAThree = (belowAThree * belowAThree) + belowAThree + 1;
      totalBAFour = (belowAFour * belowAFour) + belowAFour + 1;
      totalAAOne = (aboveAOne * aboveAOne) + aboveAOne + 1;
      totalAATwo = (aboveATwo * aboveATwo) + aboveATwo + 1;
      totalAAThree = (aboveAThree * aboveAThree) + aboveAThree + 1;
      totalAAFour = (aboveAFour * aboveAFour) + aboveAFour + 1;

      String chart = "      x     " +   "x^2 + x + 1"    + "\n"
              +         "---------+--------------"       + "\n"
              + "     " + belowAOne +   "   :   " + totalBAOne   + "\n"
              + "     " + belowATwo +   "   :   " + totalBATwo   + "\n"
              + "     " + belowAThree + "  :   " + totalBAThree  + "\n"
              + "     " + belowAFour  + " :   " + totalBAFour    + "\n"
              + "     " + " a " +       "   :   " + "L"          + "\n"
              + "     " + aboveAFour +  " :   " + totalAAFour    + "\n"
              + "     " + aboveAThree + "  :   " + totalAAThree  + "\n"
              + "     " + aboveATwo   + "   :   " + totalAATwo   + "\n"
              + "     " + aboveAOne  +  "   :   " + totalAAOne   + "\n";
      System.out.println();
      System.out.println();
      System.out.println();
      System.out.println(chart);
      System.out.println();
      System.out.println("As X approaches " + a + ", our guess "
              +          "for L is: " + L);
      System.out.println();

      // end the program
      choice = "n";
      }

      else
      {
       System.out.println();
       System.out.println("***Invalid Entry***");
       System.out.println();
      }
    }
}

}

Is there a better way to write this program?

Random "No compiler provided" error Maven

I try to build project using maven. And everytime I can have accidentally received error

No compiler is provided in this environment. perhaps you are running on a jre rather than a jdk?

And than I can run build again and everything is ok.

    JAVA_HOME C:\Program Files\Java\jre1.8.0_40
M2_HOME C:\Program Files\Maven

Window->Preferencies->Java->Installed JREs->jre1.8.0_40

pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.epam</groupId>
    <artifactId>News</artifactId>
    <version>0.0.2-SNAPSHOT</version>
    <packaging>jar</packaging>

    <properties>
        <jdk.version>1.8</jdk.version>
        <spring.version>4.1.5.RELEASE</spring.version>
        <jstl.version>1.2</jstl.version>
        <junit.version>4.12</junit.version>
        <tiles.version>3.0.5</tiles.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.unitils</groupId>
            <artifactId>unitils-dbunit</artifactId>
            <version>3.4.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.springtestdbunit</groupId>
            <artifactId>spring-test-dbunit</artifactId>
            <version>1.2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>

I have this error in 90% of using cmd(mvn package) and about 40% of using Eclipse (Maven build)

Valeant’s Sweetened Bid for Salix May Have Delivered 2 Knockouts by ROBERT CYRAN

Robert Maynard Presents New York Times Business Section via Robert Maynard Entrepreneurship Site

Alina.Li.Daddys.Favorite.mp4 (seed(ów) 24 — leecher(ów) 49)

[Obrazek]