1, Connection conn = DriverManager.getConnection(URL,DatabaseLoginName,DatabaseLoginPassword);//get database connection.
2. Statement statement = con.createStatement(); //Access the database.
3, ResultSet resultSet = statement.executeQuery(sql); //Execute SQL statement.
Java is an object-oriented programming language, not only absorbed a variety of advantages of the C + + language, but also abandoned the C + + difficult to understand the concept of multiple inheritance, pointers and so on, so the Java language has a powerful and easy to use two characteristics.
Technical Applications
1. Android Applications
Many Android applications are developed by Java programmers. Although Android utilizes a different JVM and a different wrapper, the code is still written in Java. JAVA games are supported in a significant portion of cell phones, which has led to many non-programmers becoming acquainted with JAVA.
2. Server Programs Applied in the Financial Industry
Java is widely used in the financial services industry, and many third-party trading systems, banks, and financial institutions have chosen to develop in Java because of the relative security of Java [39]. ? Large multinational investment banks use Java to write front- and back-office electronic trading systems, settlement and confirmation systems, data processing projects, and other projects.
3. Web sites
Java has taken its place in the field of e-commerce as well as in the field of Web site development. Developers can use many different frameworks to create web projects, SpringMVC, Struts 2.0, and frameworks. even simple servlets, jsp and struts-based websites are often used in government projects.
4. Embedded domain
Java has a lot of room for development in the embedded domain. In this platform, only 130KB to be able to use Java technology.
5, big data technology
Hadoop and other big data processing technologies many of which use Java, such as Apache's Java-based HBase and Accumulo as well as ElasticSearchas well.
6, high-frequency trading space
The Java platform improves this platform's features and even if compiled, he is at the same time able to pass data like C++. It is for this reason that Java has become the language of choice for programmers writing trading platforms, because although the performance is not as good as C++, developers can bypass issues such as security, portability and maintainability.
7. Scientific Applications
Java is a good choice for scientific applications, including natural language processing. The main reason is because Java is better than C++ or other languages relative to its security, portability, maintainability, and concurrency of other high-level languages.