New Classroom Practice Questions

Source: Internet
Author: User
Tags call by reference

1. To define a subclass of thread, the method that must be implemented is __c__.

A.start b.stop C.run D.yield 2. There is a definition string str;  The following statement is not correct is __a______.  A.str is a String object B.STR is a reference c.str no associated object, cannot use D.STR can point to a String object 3.Java method members need to declare content that does not include _d___. A. Permissions access modifier b. Return value type C. method member marker D. Return value variable resolution: The method member is what the class object can do. It is often necessary to declare the following items.
1. Access modifier: The same as the modifier of the data member, the methods in this class use public permissions.
2. Return value type: The method member must indicate the return value type, or void if the method has no return value.
3. Method member Identifier: The name of the method. The rule is the same as the data member identifier. It is suggested that method members be named by verb-character words. 4. The following correct (ACD) A.call by value does not change the value of the actual parameter B.call by reference can change the reference address of the actual parameter C.call by reference cannot change the reference address of the actual parameter D.all by re   Ference can change the contents of the actual parameters 5. The following statements are False (ACD). A.java Object-oriented language allows individual processes and functions to exist B.java object-oriented language allows individual methods to exist C.java the method belonging to the Class (member) D.java the method in the language must be subordinate to a "Class (object), the calling method is the same as the procedure or function  6. In the following statement about thread precedence, it is correct (C).  A. Thread priority is immutable B. The priority of a thread is the C that is set when the thread is created. D.B and C 7 can be set at any time after the thread is created. In Java, the package's hierarchy must be (a) when it is used to describe a package in the packages statement.  A. Same structure as file B. Same as file directory C. Same as file type D. Same as file size 8. In Java, the package's hierarchy must be (ACD) when it is described with a package statement. A. Same structure as file B. Same level as file directory C. Same as file type D. Same as file size 9. Which assignment statement is not legal? A a.float a = 2.0 b.double B = 2.0 C.int C = 2 D.long D = 2 10. The following statement is correct?  CD A. The access modifier can decorate a data member, or it can modify a local variable.  The b.static modifier can modify a data member, or it can modify a local variable.  C. Data members and local variables can all use any data type.   D. Data members can not be assigned the initial value, there are default values, and local variables must be assigned initial, otherwise there will be a compilation error. Explanation: A. Access modifier: The access permission modifier can decorate a data member, but cannot decorate a local variable.
B Static modifier: The static modifier can decorate a data member, but cannot modify a local variable.
C Data type: data members and local variables can all use any data type.
D Initial value: The data member can not assign the initial values, there are defaults, such as integer default is 0, float type default is 0.0, character type default is/u0000, boolean default is False, all reference type default is False. The local variables must be assigned the initial value before use, or there will be a compilation error.

New Classroom Practice Questions

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.