[Dark horse programmer] basic test questions !, Dark Horse programmer

Source: Internet
Author: User

[Dark horse programmer] basic test questions !, Dark Horse programmer

1. Compile the program to calculate the sum of 12 + 22 + 32 +... + 1002.

A:

 

2. List some sorting algorithms you know and use Java to achieve a high efficiency.

 

3. Accept a number from the keyboard and list the Chinese representation format of the number. For example, enter 123 on the keyboard to print out One, Two, and Three; enter 3103 on the keyboard to print out Sany and zero.

 

4. Determine whether a string is a symmetric string. For example, "abc" is not a symmetric string, "aba", "abba", "aaa", and "mnanm" are symmetric strings.

 

5. What is the difference between throw and throws? When are try, catch, and finally used? A:

 

6. Program to list the full character combination of a string. The original string does not contain repeated characters, for example:

The original string is "abc". Print all the following combinations:

"A" "B" "c"

"AB" "bc" "ca" "ba" "cb" "ac"

"Abc" "acb" "bac" "bca" "cab" "CBA"

 

7. Compile a function that can get the file extension. The form parameter receives a file name string and returns a string with the extension.

 

8. Print all the three-digit prime numbers programmatically. The prime number features that can only be divisible by 1 and itself.

 

9. Define a static method that receives a List <Integer> and sorts the List in the method.

 

10. Compile an HTML registry ticket with the following fields: User Name, password, Password confirmation, gender (single choice), interests (multiple choice), and city (drop-down list) personal Profile (Text domain)

To verify this form using JavaScript, you must:

1. User name: Within 10 characters including letters, numbers, and underscores (_). It must start with a letter.

2. Password: 6-16 characters

3. Confirm the password.

4. other items are required

 

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.