Java intern simple face question

Source: Internet
Author: User

public class Test1 {
public static void Main (string[] args) {
String str;
for (int i = 10000; i < 100000; i++) {
str = string.valueof (i);
if (Str.charat (0) = = Str.charat (1)
&& Str.charat (2)! = Str.charat (1)
&& Str.charat (3)! = Str.charat (2)
&& Str.charat (3) = = Str.charat (4)) {
System.out.println (str);
}
}
}
}
Converted to a string and judged directly on demand

2, the basic characteristics of the database is.
A (1) data can be shared (or structured) (2) Data independence
(3) Large data redundancy, easy to transplant (4) unified management and control
B (1) data can be shared (or structured) (2) Data independence
(3) Small data redundancy, easy to expand (4) unified management and control
C (1) data can be shared (or structured) (2) Data interchangeability
(3) Small data redundancy, easy to expand (4) unified management and control
D (1) Data non-structured (2) data independence
(3) Small data redundancy, easy to expand (4) unified management and control

Answer:b.
1. There is a connection between the data structure and the whole system. 2. Data sharing is high, redundancy is low, easy to expand 3. High data Independence 4. Data is managed and controlled centrally by the DBMS

3. The construction method cannot have a return value
The construction method cannot be overridden because overrides are required to be inherited.
Threads are CPU-oriented behavior.
The final class cannot be overridden and inherited, whereas the abstract class is an abstraction class that is not implemented by itself and can only be implemented by subclasses, that is, must be inherited. So they can't do modifiers at the same time.

4, what is the sharing of the database:

Answer: Data sharing refers to the fact that the database system is looking at and describing data from a holistic perspective, and the data is no longer oriented to an application, but to the entire system.

5, the database can sometimes produce inconsistent data due to:

Answer: Data inconsistency refers to the contradiction and incompatibility of data.
There are three main reasons for inconsistent data: one is caused by data redundancy, the other is due to improper concurrency control , and the third is caused by various faults and errors.
Root cause: Data redundancy

6, database management system to the data for the increase and deletion of the search, this method called what

Answer: Data manipulation language.

7, the use of SQL statements for group retrieval, in order to remove the group does not meet the conditions, should ___.

A Using the WHERE clause
B Use the HAVING clause after GROUP by
C Use the WHERE clause first, and then use the HAVING clause.
D Use the HAVING clause first, and then use the WHERE clause

Answer: In the SQL SELECT statement, the groupby phrase is used as a condition for grouping data, and the HAVING clause immediately follows the GROUP by statement as a further grouping condition and cannot exist alone.

8. What are the integrity constraints of a database?

Answer: All data values stored in the database are in the correct state.

If there are incorrect data values stored in the database,

The database is called lost data integrity. Data integrity

(data Integrity) refers to the accuracy (accuracy) and reliability (reliability) of the information. It is necessary to prevent the existence of non-conforming semantic provisions in the database ...

9. Must the foreign key be the primary key of the other table?

Answer

It is not necessarily a primary key, but it must be a unique index. Both primary KEY constraints and uniqueness constraints are unique indexes.

10. in the where statement, which of the following operators can replace or?

SELECT stu_no,stu_name from student WHERE stu_no =1001 OR stu_no = 1009;  In the where statement, which of the following operators can replace or?  A. In B. Between ... C. like D. <= E. >=

Answer: In SQL, or can be replaced by in or can be substituted or but the resources consumed by or are less than in, so the general situation is recommended or

Java intern simple face question

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.