Hands-on brain feel

Source: Internet
Author: User

hands on one's head:
Public classsuijishu{Private Static Final intN = 200; Private Static Final intLeft = 40; Private Static Final intright = 10000; Private Static Longx0 = 1L; Private LongA = 1103515245L; Private Longc = 12345L; Private Longm = 2147483648L; Private LongRAND (LongR) {R= (R * A + C)% m;//xn+1= (aXn + c) mod m      returnR; }Private LongLittle (intAintBLongRand) {returnA + rand% (b-a + 1 ); }Private voidRecursion (intCountLongRand) {if(Count >=N) {return; } Rand=rand (RAND); LongR =Little (left, right, Rand); System.out.print (R+ " "); Recursion (++count, Rand); } Public Static voidMain (string[] args) {Suijishu re=NewSuijishu (); Re.recursion (0, x0); }}

Hands on the brain two:

I find that functions of the same name can be different, which makes the function more comprehensive, and different parameter types can automatically invoke the corresponding function, the overloaded method.

Two or more methods that meet the following conditions form an "overloaded" relationship:

(1) The method name is the same;

(2) The parameter types are different, the number of parameters is different, or the order of the parameter types is different.

Hands-on brain feel

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.