Java programming language

Source: Internet
Author: User

Tag: Start ack res amp so string java identifier affects student

When was the 1.Java language born? Who was the founder? When to publish?

A: The Java programming language was created by Sun Microsystems's James Gosling in early 1990 and was released in 1995.

Where do the 2.java programs start?

A: The Java program starts with the Main method

3. What are the output results of the following statements?

System.out.println ("Hello");//prints Hello

The string "Hello" will be displayed on the screen

Prints Hello System.out.println ("Hello");

Because the statement is commented out, there is no output.

4. Which of the following are invalid Java identifiers? Why?

A.result

B.result

c.12345 identifiers C and E are not valid because identifiers cannot start with a number or contain the character "&"

D.x12345y

E.black&white

f.answer_7

5. Suppose that the program needs to define an identifier that represents the sum of all students ' test scores in the class, which one of the following identifiers is most appropriate? Please give a reason.

A,x

B.scoresum b is most suitable; because a cannot describe the meaning of its representative, c is too lengthy and D cannot clearly indicate its meaning

C.sum0fthetestscores0fthestudents

D.smtstscr

6. What are whitespace characters? How does it affect the execution of the program? How is the readability of the program affected?

A: whitespace refers to characters used to separate egos and symbols in a program, and the compiler ignores extra whitespace characters, so whitespace does not affect program execution. However, it is important to use whitespace characters rationally to make the program easier to read.

Java programming language

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.