20165326 Java Seventh Week study notes

Source: Internet
Author: User

Seventh Week study notes MySQL (Data management system) learning

Summary of Knowledge points:

    • You cannot close the MySQL database by closing the command line window occupied by the MySQL database server.
    • If the MySQL server and the MySQL administration tool reside on the same computer, the hostname can be localhost or 127.0.0.1.
    • JDBC is an abstraction layer that allows users to choose between different databases. JDBC allows developers to write database applications in Java without needing to be concerned with the specifics of a particular database at the bottom.
    • Query operation:
    • Send SQL query statements to the database, first with the statement declaration object, the created Connection object call creatStatement() , with the try-catch statement to create the statement object;
    • When the query result is processed, it is stored in a ResultSet class-declared object that can only see one data row at a time, use the next() method to move to the next row of data, use the getXxx method to get the field value, and pass the position index or column name to its method parameters;
    • Close the connection xx.close() ;

      XAMPP installation process and code operation

      Open Interface after successful installation

      Click Admin after MySQL, the Web interface appears


Last week's summary of wrong questions

1, the following about the subclass of the generic class, the correct number is

①linkedlist

A. 6
B. 5
C. 4
D. 3

Correct answer: B parse: ⑤treeset

2.
The following about TreeSet

A. Public Boolean contains (Object o) returns True if this set contains the specified element. Returns False if the specified object cannot be compared with the current element in the set, or is not included.
B. The public boolean add (e E) Adds the specified element to this set. If this set already contains such an element, the call does not change this set and returns FALSE.
C. public boolean addall (collection<? extends e> c) adds all the elements in the specified Collection to this set. Returns True if this set is changed because of a call.
D. Public e Lower (e e) returns the largest element in this set that is strictly less than the given element, or null if no such element exists.

Correct answer: BCD (option A, error) resolves: A: Throws an ClassCastException exception if the specified object cannot be compared with the current element in the set.

3, the following statement about the regular expression, the correct is:

A. \ba\w*\b matches a word that begins with the letter A
B. \d+ matches 1 or more consecutive digits.
C. \b\w{6}\b matches 6 or more characters.
D. [0-9] The meaning of the representation is exactly the same as the \d: a number
E. \s+ matches a string that does not contain whitespace characters.
F. (\d{1,3}.) {3}\d{1,3} is used to match an IP address.

Correct answer: Abde parse: C: \b\w{6}\b matches exactly 6 characters of a word. F: Each number in an IP address cannot be greater than 255, and the expression ignores this constraint. The Right thing is ((2[0-4]\d|25[0-5]|[ 01]?\d\d?).) {3} (2[0-4]\d|25[0-5]| [01]?\d\d?].

4, new Date (System.currenttimemillis ()) is equivalent to the new date ()

5, the transfer of parameters can not be high transmission low

20165326 Java Seventh Week study notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.